mirror of
https://github.com/wassname/react-webpack-template.git
synced 2026-06-27 19:48:31 +08:00
Added own configuration objects for different webpack environments.
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
var path = require('path');
|
||||
var webpack = require('webpack');
|
||||
var _ = require('lodash');
|
||||
|
||||
var baseConfig = require('./base');
|
||||
|
||||
var config = _.merge({
|
||||
entry: [
|
||||
'webpack-dev-server/client?http://127.0.0.1:8000',
|
||||
'webpack/hot/only-dev-server',
|
||||
'./src/components/run'
|
||||
],
|
||||
cache: true,
|
||||
devtool: 'eval',
|
||||
plugins: [
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
new webpack.NoErrorsPlugin()
|
||||
]
|
||||
}, baseConfig);
|
||||
|
||||
// Add needed loaders
|
||||
config.module.loaders.push({
|
||||
test: /\.(js|jsx)$/,
|
||||
loader: 'react-hot!babel-loader',
|
||||
include: path.join(__dirname, '/../src')
|
||||
});
|
||||
|
||||
module.exports = config;
|
||||
Reference in New Issue
Block a user