删除错误的 配置,打开生产source-map
This commit is contained in:
parent
332aa9b61a
commit
68366b25b1
@ -19,4 +19,3 @@ VUE_APP_UPLOAD_API = 'https://upload.joylink.club'
|
||||
# Detail: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
|
||||
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
VUE_APP_SOURCE_MAP = true
|
||||
|
@ -5,4 +5,3 @@ NODE_ENV = 'production'
|
||||
VUE_APP_BASE_API = 'https://api.joylink.club/jlcloud'
|
||||
VUE_APP_VOICE_API = 'https://oss.joylink.club/oss/joylink'
|
||||
VUE_APP_UPLOAD_API = 'https://upload.joylink.club'
|
||||
VUE_APP_SOURCE_MAP = false
|
||||
|
@ -5,4 +5,3 @@ NODE_ENV = 'test'
|
||||
VUE_APP_BASE_API = 'https://test.joylink.club/jlcloud'
|
||||
VUE_APP_VOICE_API = 'https://oss.joylink.club/oss/joylink'
|
||||
VUE_APP_UPLOAD_API = 'https://upload.joylink.club'
|
||||
VUE_APP_SOURCE_MAP = false
|
||||
|
@ -19,6 +19,7 @@ let outputDir = '';
|
||||
outputDir = process.env.VUE_APP_PRO == 'local' || process.env.VUE_APP_PRO == 'ntyl' ? 'dist' : 'dist/cbtc';
|
||||
})();
|
||||
|
||||
|
||||
// All configuration item explanations can be find in https://cli.vuejs.org/config/
|
||||
module.exports = {
|
||||
/**
|
||||
@ -32,7 +33,7 @@ module.exports = {
|
||||
outputDir: outputDir,
|
||||
assetsDir: 'static', // 相对于outputDir的静态资源(js、css、img、fonts)目录
|
||||
lintOnSave: false,
|
||||
productionSourceMap: process.env.VUE_APP_SOURCE_MAP,
|
||||
productionSourceMap: false,
|
||||
devServer: {
|
||||
port: port,
|
||||
host: '0.0.0.0',
|
||||
@ -72,7 +73,7 @@ module.exports = {
|
||||
// })
|
||||
// );
|
||||
if (process.env.NODE_ENV != 'development') {
|
||||
config.mode = 'production';
|
||||
config.mode = 'production';
|
||||
|
||||
Object.assign(config, {
|
||||
output:{
|
||||
@ -83,8 +84,8 @@ module.exports = {
|
||||
});
|
||||
} else {
|
||||
// 为开发环境修改配置...
|
||||
config.mode = 'development';
|
||||
config.name = name;
|
||||
config.mode = 'development';
|
||||
config.name = name;
|
||||
}
|
||||
|
||||
config.resolve = {
|
||||
@ -142,7 +143,7 @@ module.exports = {
|
||||
config
|
||||
// https://webpack.js.org/configuration/devtool/#development
|
||||
.when(process.env.NODE_ENV === 'development',
|
||||
config => config.devtool('cheap-source-map')
|
||||
config => config.devtool('eval-source-map')
|
||||
);
|
||||
|
||||
config
|
||||
|
Loading…
Reference in New Issue
Block a user