soul2.cn的vue项目
http://soul2.cn
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.3 KiB
46 lines
1.3 KiB
'use strict'
|
|
const path = require('path')
|
|
const defaultSettings = require('./src/settings.js')
|
|
|
|
function resolve(dir) {
|
|
return path.join(__dirname, dir)
|
|
}
|
|
|
|
const name = defaultSettings.title || '未命名标题'
|
|
const autoOpenBrowser = defaultSettings.autoOpenBrowser || false
|
|
const port = process.env.port || process.env.npm_config_port || 6810 // dev port
|
|
|
|
module.exports = {
|
|
/**
|
|
* You will need to set publicPath if you plan to deploy your site under a sub path,
|
|
* for example GitHub Pages. If you plan to deploy your site to https://foo.github.io/bar/,
|
|
* then publicPath should be set to "/bar/".
|
|
* In most cases please use '/' !!!
|
|
* Detail: https://cli.vuejs.org/config/#publicpath
|
|
*/
|
|
publicPath: process.env.VUE_APP_CONTEXT_PATH || '/',
|
|
outputDir: 'dist',
|
|
assetsDir: 'static',
|
|
lintOnSave: process.env.NODE_ENV === 'development',
|
|
productionSourceMap: false,
|
|
devServer: {
|
|
// disableHostCheck: true,
|
|
port: port,
|
|
open: autoOpenBrowser,
|
|
overlay: {
|
|
warnings: false,
|
|
errors: true
|
|
}
|
|
// before: require('./mock/mock-server.js')
|
|
},
|
|
configureWebpack: {
|
|
// provide the app's title in webpack's name field, so that
|
|
// it can be accessed in index.html to inject the correct title.
|
|
name: name,
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve('src')
|
|
}
|
|
}
|
|
},
|
|
}
|
|
|