Miss any of our Open RFC calls?Watch the recordings here! »

vuniversal

0.0.13 • Public • Published

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

Install

npm i vuniversal

DownloadsWeekly Downloads

8

Version

0.0.13

License

MIT

Unpacked Size

125 kB

Total Files

70

Last publish

Collaborators

  • avatar