-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack-dev.config.js
More file actions
53 lines (51 loc) · 1.56 KB
/
webpack-dev.config.js
File metadata and controls
53 lines (51 loc) · 1.56 KB
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
46
47
48
49
50
51
52
53
const webpack = require('webpack');
const path = require('path');
module.exports = {
mode: 'development',
module: {
rules: [
{
test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/],
use: [
{
loader: require.resolve("elm-asset-webpack-loader")
},
{
loader: 'elm-webpack-loader?verbose=true&warn=true',
options: {
optimize: false
, runtimeOptions: ['-A128M', '-H128M', '-n8m']
, forceWatch: true
, debug: true
}
},
]
},
{
test: /\.(jpe?g|png|gif|svg|html)$/,
exclude: /node_modules/,
loader: 'file-loader?name=[name].[ext]',
// options: {
// publicPath: function(path) {
// // transform `path` to a URL that the web server can understand and serve
// return "/public/" + path;
// }
// }
},
]
, noParse: /\.elm$/
},
output: {
path: path.resolve(__dirname, 'public'),
},
devServer: {
inline: true,
stats: {colors: true},
historyApiFallback: true,
},
plugins: [new webpack.DefinePlugin({
ENV: JSON.stringify('dev')
})
],
};