namesny-com/webpack.config.js

30 lines
803 B
JavaScript
Raw Normal View History

2017-04-09 19:09:27 +00:00
const path = require('path');
2017-04-07 19:57:56 +00:00
module.exports = {
entry: [
2017-04-09 19:09:27 +00:00
'./src/app-client.js'
2017-04-07 19:57:56 +00:00
],
output: {
2017-04-09 19:09:27 +00:00
path: path.join(__dirname, 'src', 'static', 'js'),
publicPath: "/js/",
filename: 'bundle.js'
2017-04-07 19:57:56 +00:00
},
module: {
loaders: [
{test: /\.js$/, exclude: /node_modules/, loader: "babel-loader"},
{test: /\.json$/, exclude: /node_modules/, loader: 'json-loader' },
{test: /\.(png|jpg)$/, exclude: /node_modules/, loader: 'url-loader'},
{test: /\.scss$/,
use: [{
loader: "style-loader" // creates style nodes from JS strings
}, {
loader: "css-loader" // translates CSS into CommonJS
}, {
loader: "sass-loader" // compiles Sass to CSS
}]
}
]
},
2017-04-09 19:09:27 +00:00
plugins: []
2017-04-07 19:57:56 +00:00
}