diff --git a/packages/@vue/cli-service/types/ProjectOptions.d.ts b/packages/@vue/cli-service/types/ProjectOptions.d.ts index b4c0269e75..0485ba5c0b 100644 --- a/packages/@vue/cli-service/types/ProjectOptions.d.ts +++ b/packages/@vue/cli-service/types/ProjectOptions.d.ts @@ -23,37 +23,137 @@ interface ExtractOptions { } interface CSSOptions { + /** + * Default: `true` + * + * By default, only files that ends in `*.module.[ext]` are treated as CSS modules + */ requireModuleExtension?: boolean; + /** + * Default: `true` + * + * Whether to extract CSS in your components into a standalone CSS files (instead of inlined in JavaScript and injected dynamically) + */ extract?: boolean | ExtractOptions; + /** + * Default: `false` + * + * Whether to enable source maps for CSS. Setting this to `true` may affect build performance + */ sourceMap?: boolean; + /** + * Default: `{}` + * + * Pass options to CSS-related loaders + */ loaderOptions?: LoaderOptions; } interface ProjectOptions { + /** + * Default: `'/'` + * + * The base URL your application bundle will be deployed at + */ publicPath?: string; + /** + * Default: `'dist'` + * + * The directory where the production build files will be generated in when running `vue-cli-service build` + */ outputDir?: string; + /** + * Default: `''` + * + * A directory (relative to `outputDir`) to nest generated static assets (js, css, img, fonts) under + */ assetsDir?: string; + /** + * Default: `'index.html'` + * + * Specify the output path for the generated `index.html` (relative to `outputDir`). Can also be an absolute path + */ indexPath?: string; + /** + * Default: `true` + * + * By default, generated static assets contains hashes in their filenames for better caching control + */ filenameHashing?: boolean; + /** + * Default: `false` + * + * Whether to use the build of Vue core that includes the runtime compiler + */ runtimeCompiler?: boolean; + /** + * Default: `[]` + * + * If you want to explicitly transpile a dependency with Babel, you can list it in this option + */ transpileDependencies?: Array; + /** + * Default: `true` + * + * Setting this to `false` can speed up production builds if you don't need source maps for production + */ productionSourceMap?: boolean; + /** + * Default: `require('os').cpus().length > 1` + * + * Whether to use `thread-loader` for Babel or TypeScript transpilation + */ parallel?: boolean | number; - devServer?: object; + /** + * [All options for `webpack-dev-server`](https://webpack.js.org/configuration/dev-server/) are supported + */ + devServer?: { proxy: string | object, [key: string]: any }; + /** + * Default: `undefined` + * + * Build the app in multi-page mode + */ pages?: { [key: string]: PageEntry | PageConfig; }; + /** + * Default: `undefined` + * + * Configure the `crossorigin` attribute on `` and `