2017-02-14 10:26:27 +00:00
|
|
|
var path = require("path");
|
|
|
|
var HtmlWebpackPlugin = require("html-webpack-plugin");
|
|
|
|
var webpack = require("webpack");
|
|
|
|
module.exports = {
|
|
|
|
context: path.join(__dirname, "src"),
|
|
|
|
entry: "./index.js",
|
|
|
|
output: {
|
|
|
|
path: path.join(__dirname, "build"),
|
|
|
|
filename: "app.js"
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: "./index.html"
|
|
|
|
})
|
2017-02-20 14:40:25 +00:00
|
|
|
],
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.scss$/,
|
|
|
|
use: [{
|
|
|
|
loader: "style-loader"
|
|
|
|
}, {
|
|
|
|
loader: "css-loader"
|
|
|
|
}, {
|
|
|
|
loader: "sass-loader"
|
|
|
|
}]
|
2017-02-20 15:22:16 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.hbs$/,
|
|
|
|
use: [
|
|
|
|
{
|
|
|
|
loader: "handlebars-loader"
|
|
|
|
}
|
|
|
|
]
|
2017-02-20 14:40:25 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2017-02-14 10:26:27 +00:00
|
|
|
}
|
2017-02-20 14:40:25 +00:00
|
|
|
|
|
|
|
//SASS code from https://github.com/jtangelder/sass-loader licensed under MIT, see https://github.com/jtangelder/sass-loader/blob/master/LICENSE
|