-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
executable file
·50 lines (48 loc) · 1.14 KB
/
webpack.config.js
File metadata and controls
executable file
·50 lines (48 loc) · 1.14 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
/* eslint-disable no-var */
var webpack = require('webpack');
var path = require('path');
module.exports = {
entry: [
'webpack-dev-server/client?http://localhost:5001',
'webpack/hot/dev-server',
'./javascripts/app'
],
output: {
path: path.resolve(__dirname, "dist"),
filename: 'bundle.js',
publicPath: '/js/'
},
resolve: {
root: [
path.resolve(__dirname, "javascripts"),
path.resolve(__dirname, "stylesheets")
],
extensions: ['', '.js', '.jsx', '.css', '.scss']
},
devtool: 'eval-source-map',
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
module: {
loaders: [
{
test: /\.(jsx|js)?$/,
exclude: /node_modules/,
loader: 'babel'
},
{
test: /\.(css|scss)?$/,
loaders: ['style-loader', 'css-loader', 'sass-loader?sourceMap']
},
{
test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: "url-loader?limit=10000&mimetype=application/font-woff"
},
{
test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: "file-loader"
}
]
}
};