Commit 389fa3c5 authored by 神楽坂玲奈's avatar 神楽坂玲奈

env

parent 61521e23
This diff is collapsed.
let publicPath = 'https://cdn01.moecube.com/accounts/';
let publicPath = 'https://cdn01.moecube.com/accounts/'
const API_ROOT = { const API_ROOT = {
test: 'http://192.168.1.9:3000', development: 'http://192.168.1.9:3000',
dev: 'http://114.215.243.95:8082', test: 'http://114.215.243.95:8082',
prod: 'https://api.moeube.com/accounts' production: 'https://api.moeube.com/accounts'
} };
let defineConf = { let defineConf = {
apiRoot: API_ROOT[process.env["ENV"]], apiRoot: API_ROOT[process.env['ENV']],
} };
export default { export default {
"entry": "src/index.js", 'entry': 'src/index.js',
publicPath, publicPath,
define: {...defineConf}, define: { ...defineConf },
"env": { 'env': {
"development": { 'development': {
"extraBabelPlugins": [ 'extraBabelPlugins': [
"dva-hmr", 'dva-hmr',
"transform-runtime", 'transform-runtime',
["import", { "libraryName": "antd", "style": "css" }] ['import', { 'libraryName': 'antd', 'style': 'css' }]
] ]
}, },
"production": { 'production': {
"extraBabelPlugins": [ 'extraBabelPlugins': [
"transform-runtime", 'transform-runtime',
["import", { "libraryName": "antd", "style": "css" }] ['import', { 'libraryName': 'antd', 'style': 'css' }]
] ]
} }
} }
} };
{ {
"private": true, "private": true,
"scripts": { "scripts": {
"start": "cross-env ENV=test roadhog server", "start": "cross-env ENV=development roadhog server",
"build:dev": "cross-env ENV=dev roadhog build", "build:test": "cross-env ENV=test roadhog build",
"build": "cross-env ENV=prod roadhog build", "build": "cross-env ENV=production roadhog build",
"lint": "eslint --ext .js src test", "lint": "eslint --ext .js src test",
"precommit": "npm run lint" "precommit": "npm run lint"
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment