-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
44 lines (39 loc) · 967 Bytes
/
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
var webpack = require('webpack');
var path = require('path');
module.exports = {
entry: './source/assets/javascripts/index.js',
resolve: {
root: path.join(__dirname, 'source/assets/javascripts'),
modulesDirectories: [
path.join(__dirname, 'node_modules'),
path.join(__dirname, 'source/assets/stylesheets')
],
extensions: ['', '.js', '.scss'],
alias: {
bootstrap: 'bootstrap-sass/assets/javascripts/bootstrap.min.js'
}
},
output: {
path: path.join(__dirname, '.tmp/dist'),
filename: 'assets/javascripts/[name].js'
},
module: {
loaders: [
{
test: /\.woff2?$|\.ttf$|\.eot$|\.svg$/,
loader: 'file'
},
{
test: /\.scss$/,
loaders: ['style', 'css', 'sass']
},
{
test: /\.(jpg|png)$/,
loaders: 'file-loader?name=[name].[ext]'
},
]
},
sassLoader: {
includePaths: [path.join(__dirname, 'node_modules')]
}
};