vyx-hex/webpack.config.js

37 lines
785 B
JavaScript
Raw Normal View History

2019-06-07 14:46:13 +00:00
const HtmlWebpackPlugin = require('html-webpack-plugin'); //installed via npm
const path = require('path');
module.exports = {
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
},
module: {
rules: [
{
test: /\.scss$/,
use: [
{ loader: "style-loader" },
{ loader: "css-loader" },
{
loader: "sass-loader",
options: {
includePaths: ["absolute/path/a", "absolute/path/b"],
},
},
],
},
],
},
plugins: [
new HtmlWebpackPlugin({ template: './src/index.html' }),
],
devServer: {
contentBase: path.join(__dirname, 'dist'),
compress: true,
port: 8080,
hot: true,
}
};