-
Notifications
You must be signed in to change notification settings - Fork 3
/
webpack.test.js
38 lines (35 loc) · 1.09 KB
/
webpack.test.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
const config = require('./webpack.config');
const bourbon = require('node-bourbon').includePaths;
config.devtool = 'source-map';
// Should be an empty object if it's generating a test build
// Karma will set this when it's a test build
config.entry = {
main: './app.js'
};
// Should be an empty object if it's generating a test build
// Karma will handle setting it up for you when it's a test build
config.output = {};
config.module.rules = [
{
test: /\.scss/,
use: [
'style-loader',
{ loader: 'css-loader', options: { importLoaders: 1 } },
'postcss-loader',
{
loader: 'sass-loader',
options: {
includePaths: bourbon
}
}
]
},
{
test: /\.css$/,
use: ['style-loader', { loader: 'css-loader', options: { importLoaders: 1 } }, 'postcss-loader']
},
{ test: /\.(png|jpg|gif|jpeg)$/, loader: 'url-loader?limit=8192' },
{ test: /\.(woff|woff2)$/, loader: 'url-loader?limit=10000&minetype=application/font-woff' },
{ test: /\.(ttf|eot|svg)$/, loader: 'file-loader' }
].concat(config.module.rules);
module.exports = config;