Created
April 28, 2017 15:06
-
-
Save xuyuji9000/46b55b077a3671a71789af2d2f27b854 to your computer and use it in GitHub Desktop.
This file contains 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
var webpack = require('webpack'); | |
var path = require('path'); | |
module.exports = { | |
context: __dirname, | |
devtool: "inline-sourcemap" , | |
entry: [ | |
"./src/app.js", | |
"webpack-dev-server/client?http://localhost:8080", | |
"webpack/hot/dev-server" | |
], | |
output: { | |
path: __dirname + "/dist", | |
filename: "bundle.js", | |
publicPath: "/dist/" | |
}, | |
plugins: [ | |
new webpack.HotModuleReplacementPlugin() | |
], | |
module: { | |
loaders: [ | |
{ | |
test: /.jsx?$/, | |
exclude: /node_modules/, | |
loaders: ['react-hot-loader/webpack', 'babel-loader?'+JSON.stringify({ | |
presets: ['es2015', 'react', 'stage-2', "stage-1"], | |
plugins: ["transform-decorators-legacy", "transform-class-properties"] | |
})], | |
include: path.join(__dirname, 'src') | |
}, | |
{ | |
test: /\.css$/, | |
loader: 'style!css?modules', | |
include: /flexboxgrid/ | |
} | |
] | |
}, | |
node: { | |
fs: "empty" | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment