Commit 4fa7588e by 万亚飞

config

parent ee786471
......@@ -104,7 +104,7 @@ module.exports = merge(base, {
},
plugins: [
new webpack.DefinePlugin({
'process.env': env
'process.env': JSON.stringify(env)
}),
new HtmlWebpackPlugin({
template: resolveRoot('index.html')
......
......@@ -13,7 +13,7 @@ const merge = require('webpack-merge');
const base = require('./webpack.base.js');
const env = require(`../config/${process.env.ENV_MARK}.env`);
console.log('env', env.NODE_ENV);
const os = require('os');
function resolveRoot(dir) {
return path.join(__dirname, '..', dir);
......@@ -147,7 +147,7 @@ module.exports = merge(base, {
},
plugins: [
new webpack.DefinePlugin({
'process.env': env
'process.env': JSON.stringify(env)
}),
new HtmlWebpackPlugin({
template: resolveRoot('index.html'),
......
//开发环境
module.exports = {
NODE_ENV: '"development"',
ENV_MARK: '"development"',
prefix: '"https://testapi.ydl.com/api"',
prefixH2: '"https//testh2.yidianling.com"'
NODE_ENV: 'development',
ENV_MARK: 'development',
prefix: 'https://testapi.ydl.com/api',
prefixH2: 'https//testh2.yidianling.com'
};
module.exports = {
NODE_ENV: '"production"',
ENV_MARK: '"production"',
prefix: '"https://api.ydl.com/api"',
prefixH2: '"https://h2.yidianling.com"'
NODE_ENV: 'production',
ENV_MARK: 'production',
prefix: 'https://api.ydl.com/api',
prefixH2: 'https://h2.yidianling.com'
};
module.exports = {
NODE_ENV: '"production"',
ENV_MARK: '"testing"',
prefix: '"https://testapi.ydl.com/api"',
prefixH2: '"https//testh2.yidianling.com"'
NODE_ENV: 'production',
ENV_MARK: 'testing',
prefix: 'https://testapi.ydl.com/api',
prefixH2: 'https//testh2.yidianling.com'
};
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