vyx-hex/webpack.config.js

36 lines
746 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" },
2019-06-07 18:07:24 +00:00
{ loader: "sass-loader" },
2019-06-07 14:46:13 +00:00
],
},
2019-06-14 10:45:35 +00:00
{
test: /\.worker\.js$/,
use: { loader: 'worker-loader' },
},
2019-06-07 14:46:13 +00:00
],
},
plugins: [
new HtmlWebpackPlugin({ template: './src/index.html' }),
],
devServer: {
contentBase: path.join(__dirname, 'dist'),
compress: true,
port: 8080,
hot: true,
}
};