Created
March 22, 2017 17:55
-
-
Save merss19/815d3ff60a1a475a426df8a76af384c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webpackMerge = require('webpack-merge'); | |
const webpack = require('webpack') | |
const commonConfig = require('./base.js'); | |
const path = require('path') | |
const publicPath = '/' | |
process.env.NODE_ENV = 'development'; | |
module.exports = function (env) { | |
console.log('dev') | |
console.log(env) | |
return webpackMerge(commonConfig(), { | |
devtool: 'cheap-module-source-map', | |
plugins: [ | |
new webpack.DefinePlugin({ | |
'process.env': { | |
'NODE_ENV': JSON.stringify('development'), | |
'BABEL_ENV': JSON.stringify('development') | |
} | |
}) | |
], | |
devServer: { | |
port: 3000, | |
host: 'localhost', | |
historyApiFallback: true, | |
noInfo: false, | |
stats: 'minimal', | |
publicPath: publicPath | |
} | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment