git: init+修改node版本
This commit is contained in:
7
config/dev.env.js
Normal file
7
config/dev.env.js
Normal file
@@ -0,0 +1,7 @@
|
||||
//开发环境
|
||||
module.exports = {
|
||||
NODE_ENV: '"development"',
|
||||
BASE_API: '"http://127.0.0.1"',
|
||||
DOMAIN: '"http://localhost:8081"',
|
||||
SOCKET_URL:'"ws://127.0.0.1:8326/"'
|
||||
}
|
||||
44
config/index.js
Normal file
44
config/index.js
Normal file
@@ -0,0 +1,44 @@
|
||||
// see http://vuejs-templates.github.io/webpack for documentation.
|
||||
var path = require('path')
|
||||
let env;
|
||||
if(process.env.NODE_ENV == 'production'){
|
||||
env = require('./prod.env');
|
||||
}else if(process.env.NODE_ENV == 'sit'){
|
||||
env = require('./sit.env');
|
||||
}
|
||||
module.exports = {
|
||||
build: {
|
||||
env: env,
|
||||
port: 9000,
|
||||
index: path.resolve(__dirname, '../web/index.html'),
|
||||
assetsRoot: path.resolve(__dirname, '../web'),
|
||||
assetsSubDirectory: 'static',
|
||||
assetsPublicPath: '',
|
||||
productionSourceMap: true,
|
||||
// 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
|
||||
},
|
||||
dev: {
|
||||
env: require('./dev.env'),
|
||||
port: 8081,
|
||||
autoOpenBrowser: true,
|
||||
assetsSubDirectory: 'static',
|
||||
assetsPublicPath: '/',
|
||||
proxyTable: {},
|
||||
// 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
|
||||
}
|
||||
}
|
||||
7
config/prod.env.js
Normal file
7
config/prod.env.js
Normal file
@@ -0,0 +1,7 @@
|
||||
//测试环境
|
||||
module.exports = {
|
||||
NODE_ENV: '"production"',
|
||||
BASE_API:'"http://47.75.125.96"',
|
||||
DOMAIN: '"http://47.75.125.96"',
|
||||
SOCKET_URL:'"ws://47.75.47.120:8326"'
|
||||
}
|
||||
7
config/sit.env.js
Normal file
7
config/sit.env.js
Normal file
@@ -0,0 +1,7 @@
|
||||
//压力测试环境
|
||||
module.exports = {
|
||||
NODE_ENV: '"site"',
|
||||
BASE_API: '"http://www.pcn.li"',
|
||||
DOMAIN: '"http://pcn.li"',
|
||||
SOCKET_URL:'"ws://ws.pcn.li/"'
|
||||
}
|
||||
Reference in New Issue
Block a user