|
-
- const port = process.env.port || process.env.npm_config_port || 8080;
-
- module.exports = {
-
-
- outputDir: 'dist',
-
-
- productionSourceMap: false,
-
- pages: {
-
- index: {
- entry: './src/main.js',
- template: './public/index.html',
-
- chunks: ['chunk-vendors', 'chunk-common', 'index'],
- subpage: 'src/main.js'
- },
-
- gaode: {
- entry: './src/pages/gaode.js',
- template: './public/gaode.html',
- title: '高德地图demo',
- chunks: ['chunk-vendors', 'chunk-common', 'gaode'],
- subpage: 'src/pages/gaode.js'
- }
- },
- 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();
-
-
-
-
-
-
- }
- };
|