Former-commit-id: 69e5e4092b151379d27aa2eccde1255672277fb8 [formerly 69e5e4092b151379d27aa2eccde1255672277fb8 [formerly 69e5e4092b151379d27aa2eccde1255672277fb8 [formerly 69e5e4092b151379d27aa2eccde1255672277fb8 [formerly b70254441d8a42159229d3a1ffb6337a4904ce87 [formerly 218fe905d457ba3c6d7f48ceda77fbd38a6341ce]]]]] Former-commit-id: 185cbeff13a282fadbf959c1227927501f39a728 Former-commit-id: 5740a528b4627568a348f2d3b59528a16c7a6f34 Former-commit-id: 771cc66a523221c6ee2b0279a0819caab64b2f53 [formerly c7def5344c50d8edf8a3b41a2dbc1305445282f2] Former-commit-id: 3a9c6a8dd6b4399b04be05749d21692bff9ddc33 Former-commit-id: 6a4677e1001a6ec39cd7e5e051eaee1b1bf85ae1 Former-commit-id: 553208b3aaf49b39a63f495eec7097f9efcb2bd5 Former-commit-id: 1887cc7586fb947dd9f8815e61e6abd349bbdb4b Former-commit-id: 0ba5ab3302ce4540b3706a32178e515ba9053536
83 lines
2.6 KiB
JavaScript
Executable File
83 lines
2.6 KiB
JavaScript
Executable File
'use strict'
|
|
// Template version: 1.2.7
|
|
// see http://vuejs-templates.github.io/webpack for documentation.
|
|
|
|
const path = require('path')
|
|
|
|
module.exports = {
|
|
dev: {
|
|
|
|
// Paths
|
|
assetsSubDirectory: 'static',
|
|
assetsPublicPath: '/',
|
|
proxyTable: {},
|
|
|
|
// Various Dev Server settings
|
|
host: 'localhost', // can be overwritten by process.env.HOST
|
|
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
|
autoOpenBrowser: false,
|
|
errorOverlay: true,
|
|
notifyOnErrors: true,
|
|
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
|
|
|
|
// Use Eslint Loader?
|
|
// If true, your code will be linted during bundling and
|
|
// linting errors and warnings will be shown in the console.
|
|
useEslint: true,
|
|
// If true, eslint errors and warnings will also be shown in the error overlay
|
|
// in the browser.
|
|
showEslintErrorsInOverlay: false,
|
|
|
|
/**
|
|
* Source Maps
|
|
*/
|
|
|
|
// https://webpack.js.org/configuration/devtool/#development
|
|
devtool: 'eval-source-map',
|
|
|
|
// If you have problems debugging vue-files in devtools,
|
|
// set this to false - it *may* help
|
|
// https://vue-loader.vuejs.org/en/options.html#cachebusting
|
|
cacheBusting: true,
|
|
|
|
// CSS Sourcemaps off by default because relative paths are "buggy"
|
|
// with this option, according to the CSS-Loader README
|
|
// (https://github.com/webpack/css-loader#sourcemaps)
|
|
// In our experience, they generally work as expected,
|
|
// just be aware of this issue when enabling this option.
|
|
cssSourceMap: false,
|
|
},
|
|
|
|
build: {
|
|
// Template for index.html
|
|
index: path.resolve(__dirname, '../dist/index.html'),
|
|
|
|
// Paths
|
|
assetsRoot: path.resolve(__dirname, '../dist'),
|
|
assetsSubDirectory: 'static',
|
|
// 请根据你的站点地址修改这里
|
|
assetsPublicPath: '/d2-admin-preview/',
|
|
|
|
/**
|
|
* Source Maps
|
|
*/
|
|
|
|
productionSourceMap: true,
|
|
// https://webpack.js.org/configuration/devtool/#production
|
|
devtool: '#source-map',
|
|
|
|
// Gzip off by default as many popular static hosts such as
|
|
// Surge or Netlify already gzip all static assets for you.
|
|
// Before setting to `true`, make sure to:
|
|
// npm install --save-dev compression-webpack-plugin
|
|
productionGzip: false,
|
|
productionGzipExtensions: ['js', 'css'],
|
|
|
|
// Run the build command with an extra argument to
|
|
// View the bundle analyzer report after build finishes:
|
|
// `npm run build --report`
|
|
// Set to `true` or `false` to always turn it on or off
|
|
bundleAnalyzerReport: process.env.npm_config_report
|
|
}
|
|
}
|