Giter Club home page Giter Club logo

vuniversal's Introduction


Create vue (3) universal web applications quickly.


       


Usage

yarn add vuniversal

# init vun config file
npx vun init

package.json

"scripts": {
  "dev": "vun",
  "build": "vun build",
  "test": "vun test",
  "lint": "eslint --ext .js,.ts,.vue src"
}

Config

vun.config.js

export interface VunLibConfig {
  universal: boolean
  modern: boolean
  clientEntry: string
  serverEntry: string
  template: string
  inspect: boolean
  prerender: false | {
    routes: string[]
    fallback: true | string
    options: object
  }
  lintOnSave: boolean | 'default' | 'warning' | 'error'
  dir: {
    build: string
    public: string
    source: string
    root: string
    modules: string[]
  }
  env: VunEnvObject
  dev: {
    host: string
    port: number
    verbose: boolean
    proxy: WebpackDevServer.ProxyConfigMap | WebpackDevServer.ProxyConfigArray
    devServer: WebpackDevServer.Configuration
  }
  build: {
    analyze: boolean | object
    publicPath: string
    assetsDir: string
    filenameHashing: boolean
    runtimeCompiler: boolean
    transpileDependencies: Array<string | RegExp>
    productionSourceMap: boolean
    parallel: boolean | number 
    crossorigin: false | '' | 'anonymous' | 'use-credentials'
    optimization: webpack.Configuration['optimization']
    css: {
      requireModuleExtension: boolean
      extract: boolean | {
        filename: string;
        chunkFilename: string
      }
      sourceMap: boolean
      styleResources: {
        scss: string[]
        sass: string[]
        less: string[]
        stylus: string[]
      }
    }
    loaders: {
      vue: LoaderOptions
      imgUrl: LoaderOptions
      fontUrl: LoaderOptions
      mediaUrl: LoaderOptions
      svgFile: LoaderOptions
      css: LoaderOptions
      scss: LoaderOptions
      sass: LoaderOptions
      less: LoaderOptions
      stylus: LoaderOptions
      postcss: LoaderOptions
      vueStyle: LoaderOptions
    }
  }
  babel: any
  webpack: ((config: webpack.Configuration, buildContext: BuildContext) => (webpack.Configuration | void))
  typescript: boolean | {
    tsLoader: Partial<TsLoaderOptions>
    forkTsChecker: boolean | Partial<ForkTsCheckerOptions>
  }
}

Changelog

Detailed changes for each release are documented in the release notes.

License

MIT

vuniversal's People

Contributors

surmon-china avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ollivr

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.