Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.

surmon-china/vuniversal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4f235e7 · May 9, 2022

History

78 Commits
May 9, 2022
May 19, 2020
May 19, 2020
May 18, 2020
May 10, 2020
May 7, 2020
May 7, 2020
May 19, 2020
Apr 29, 2020
May 10, 2020
May 7, 2020
May 7, 2020
May 14, 2020
Apr 5, 2020
May 9, 2022
May 19, 2020
May 19, 2020
May 7, 2020
May 7, 2020
May 7, 2020
May 19, 2020

Repository files navigation


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