vuejs / vue-component-compiler

Compile a single file Vue component into a CommonJS module.
MIT License
343 stars 52 forks source link

For TemplateOptions, is there a way to set isProduction without setting compiler and compilerOptions? #81

Open meteorlxy opened 5 years ago

meteorlxy commented 5 years ago

As defined in the types file:

interface TemplateOptions {
  compiler: VueTemplateCompiler
  compilerOptions: VueTemplateCompilerOptions
  preprocessOptions?: any
  transformAssetUrls?: AssetURLOptions | boolean
  transpileOptions?: any
  isProduction?: boolean
  optimizeSSR?: boolean
}

compiler and compilerOptions is required, so if I want to set isProduction to true, I have to set the compiler and compilerOptions together, which I don't want to change at all.

Is there a way to set isProduction without setting compiler and compilerOptions?

(Without setting process.env.NODE_ENV of course.)