25 lines
521 B
JavaScript
25 lines
521 B
JavaScript
// webpack.config.js:
|
|
|
|
var path = require('path');
|
|
var webpack = require('webpack');
|
|
|
|
module.exports = {
|
|
resolve: {
|
|
extensions: ['.js', '.jsx']
|
|
},
|
|
entry: [
|
|
path.resolve(__dirname, 'src/index.jsx')
|
|
],
|
|
output: {
|
|
path: path.resolve(__dirname, 'public/dist'),
|
|
filename: 'main.js',
|
|
publicPath: 'dist/'
|
|
},
|
|
module: {
|
|
loaders: [
|
|
{ test: /\.css$/, loader: "style!css" },
|
|
{ test: /\.js(x)?$/, exclude: /node_modules/, loader: "babel-loader" }
|
|
]
|
|
},
|
|
devtool: 'source-map'
|
|
}
|