update config
This commit is contained in:
parent
1dfea3b287
commit
653de1f31e
|
@ -1,4 +1,4 @@
|
||||||
VUE_APP_BASE_API = '/api'
|
VUE_APP_BASE_API = '/api-dev'
|
||||||
|
|
||||||
// With this configuration, vue-cli uses babel-plugin-dynamic-import-node
|
// With this configuration, vue-cli uses babel-plugin-dynamic-import-node
|
||||||
// It only does one thing by converting all import() to require()
|
// It only does one thing by converting all import() to require()
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
VUE_APP_BASE_API = '/api'
|
VUE_APP_BASE_API = '/api-prod'
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vue-cli-service serve",
|
"dev": "vue-cli-service serve",
|
||||||
"build:prod": "vue-cli-service build",
|
"build:prod": "vue-cli-service build",
|
||||||
"build:sit": "vue-cli-service build --mode text",
|
"build:sit": "vue-cli-service build --mode sit",
|
||||||
"build:preview": "node build/index.js --preview",
|
"build:preview": "node build/index.js --preview",
|
||||||
"build:report": "node build/index.js --report",
|
"build:report": "node build/index.js --report",
|
||||||
"lint": "eslint --ext .js,.vue src",
|
"lint": "eslint --ext .js,.vue src",
|
||||||
|
|
|
@ -5,7 +5,9 @@ function resolve(dir) {
|
||||||
return path.join(__dirname, dir)
|
return path.join(__dirname, dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
const port = 9527 // TODO: change to Settings
|
// TODO: change to Settings
|
||||||
|
const port = 9527
|
||||||
|
const name = 'vue-element-admin'
|
||||||
|
|
||||||
// Explanation of each configuration item You can find it in https://cli.vuejs.org/config/
|
// Explanation of each configuration item You can find it in https://cli.vuejs.org/config/
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -20,7 +22,7 @@ module.exports = {
|
||||||
publicPath: '/',
|
publicPath: '/',
|
||||||
outputDir: 'dist',
|
outputDir: 'dist',
|
||||||
assetsDir: 'static',
|
assetsDir: 'static',
|
||||||
lintOnSave: process.env.NODE_ENV !== 'production',
|
lintOnSave: process.env.NODE_ENV === 'development' ? 'error' : false,
|
||||||
productionSourceMap: false,
|
productionSourceMap: false,
|
||||||
devServer: {
|
devServer: {
|
||||||
port: port,
|
port: port,
|
||||||
|
@ -39,7 +41,6 @@ module.exports = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
after(app) {
|
after(app) {
|
||||||
console.log('apple')
|
|
||||||
const bodyParser = require('body-parser')
|
const bodyParser = require('body-parser')
|
||||||
require('@babel/register')
|
require('@babel/register')
|
||||||
// parse app.body
|
// parse app.body
|
||||||
|
@ -59,7 +60,7 @@ module.exports = {
|
||||||
configureWebpack: {
|
configureWebpack: {
|
||||||
// We provide the app's title in Webpack's name field, so that
|
// We provide the app's title in Webpack's name field, so that
|
||||||
// it can be accessed in index.html to inject the correct title.
|
// it can be accessed in index.html to inject the correct title.
|
||||||
name: 'vue-element-admin', // TODO: change to Settings
|
name: name,
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': resolve('src')
|
'@': resolve('src')
|
||||||
|
@ -102,11 +103,13 @@ module.exports = {
|
||||||
.when(process.env.NODE_ENV !== 'development',
|
.when(process.env.NODE_ENV !== 'development',
|
||||||
config => {
|
config => {
|
||||||
config
|
config
|
||||||
.plugin('ScriptExtHtmlWebpackPlugin')
|
// .plugin('ScriptExtHtmlWebpackPlugin')
|
||||||
.use('script-ext-html-webpack-plugin', [{
|
// .after('html')
|
||||||
// `runtime` must same as runtimeChunk name. default is `runtime`
|
// .use('script-ext-html-webpack-plugin', [{
|
||||||
inline: /runtime\..*\.js$/
|
// // `runtime` must same as runtimeChunk name. default is `runtime`
|
||||||
}])
|
// inline: /runtime\..*\.js$/
|
||||||
|
// }])
|
||||||
|
// .end()
|
||||||
config
|
config
|
||||||
.optimization.splitChunks({
|
.optimization.splitChunks({
|
||||||
chunks: 'all',
|
chunks: 'all',
|
||||||
|
|
Loading…
Reference in New Issue