|
-
- const port = process.env.port || process.env.npm_config_port || 8080;
-
- module.exports = {
-
- publicPath: './',
- outputDir: 'dist',
-
-
- productionSourceMap: false,
- devServer: {
- port: port,
- open: true,
- overlay: {
- warnings: false,
- errors: true
- },
-
-
-
- },
- css: {
-
-
- extract: true,
-
- sourceMap: true,
-
- loaderOptions: {
- sass: {
-
- prependData: `@import "@/assets/css/public.scss";`
- },
- },
-
- requireModuleExtension: true
- },
- configureWebpack: {
- externals: {
- 'AMap': 'AMap'
- }
- },
- chainWebpack: config => {
-
-
-
-
- if (process.env.NODE_ENV !== 'production')
- config.output.filename('js/[name].[hash].js').chunkFilename('js/[name].[hash].js').end();
-
-
-
-
-
-
- }
- };
|