Skip to content

Instantly share code, notes, and snippets.

@himstar
Last active July 11, 2017 01:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save himstar/898e1a7fd92922cdf82254980817c65f to your computer and use it in GitHub Desktop.
Save himstar/898e1a7fd92922cdf82254980817c65f to your computer and use it in GitHub Desktop.
var webpack = require("webpack");
module.exports = {
entry: {
"react-reading-time": [
"webpack-dev-server/client?http://localhost:8881/",
"webpack/hot/only-dev-server",
"./example/react-reading-time.jsx"
] },
output: {
path: __dirname,
filename: "[name].js",
publicPath: "http://localhost:8881/",
chunkFilename: "[id].chunk.js",
sourceMapFilename: "[name].map"
},
resolve: {
extensions: ["", ".js", ".jsx", ".es6"],
modulesDirectories: ["node_modules"]
},
module: {
loaders: [
{
test: /\.jsx$|\.es6$|\.js$/,
loader: "babel",
query:
{
presets:["es2015", "react"]
},
exclude: /node_module/},
{ test: /\.scss$|\.css$/, loader: "style-loader!style!css!sass" }
]
},
plugins:
[
new webpack.NoErrorsPlugin()
],
devtool: "eval-source-map"
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment