forked from clappr/clappr
-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack-base-config.js
43 lines (42 loc) · 1.01 KB
/
webpack-base-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
/* eslint-disable no-var */
var path = require('path')
var webpack = require('webpack')
module.exports = {
plugins: [
new webpack.DefinePlugin({
VERSION: JSON.stringify(require('./package.json').version)
}),
],
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: [path.resolve(__dirname, './node_modules')]
// config in .babelrc
},
{
test: /\.scss$/,
loaders: ['css', 'sass?includePaths[]='
+ require('node-bourbon').includePaths
+ '&includePaths[]='
+ path.resolve(__dirname, './src/base/scss')
],
include: path.resolve(__dirname, 'src')
},
{
test: /\.(png|woff|eot|ttf|swf|cur)/, loader: 'url-loader?limit=1'
},
{
test: /\.svg/, loader: 'svg-inline'
},
{
test: /\.html/, loader: 'html?minimize=false'
}
]
},
resolve: {
root: path.resolve(__dirname, 'src'),
extensions: ['', '.js']
}
}