-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
45 lines (44 loc) · 1.19 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
const HTMLWebpackPlugin = require('html-webpack-plugin')
const path = require('path')
const webpack = require('webpack')
module.exports = {
entry: [
'webpack-hot-middleware/client',
// App point-of-entry
'./src/index.js',
],
module: {
loaders: [
{
test: /\.css$/,
loaders: [
'style-loader',
'css-loader?modules&importLoaders=1&sourceMap&localIdentName=[name]__[local]___[hash:base64:5]!postcss-loader',
],
exclude: /node_modules/,
},
{
include: path.resolve(__dirname, 'src'),
test: /\.js$/,
// Re: ordering see https://github.com/MoOx/eslint-loader#usage
use: ['babel-loader', 'eslint-loader'],
},
],
},
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
// The public URL address of the output files when referenced in a browser.
publicPath: '/',
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
// Required for HMR
new webpack.NoEmitOnErrorsPlugin(),
// Generate an index.html file in dist/ from the template.
new HTMLWebpackPlugin({
template: 'index.html',
title: 'GB Z80 Tools',
}),
],
}