-
Notifications
You must be signed in to change notification settings - Fork 23
/
webpack.config-test.babel.js
53 lines (51 loc) · 1.38 KB
/
webpack.config-test.babel.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
45
46
47
48
49
50
51
52
53
/* eslint import/no-commonjs: 0 */
const path = require('path');
const nodeExternals = require('webpack-node-externals');
export default {
target: 'node',
externals: [nodeExternals()],
module: {
loaders: [
{
test: /\.(jsx|js)$/,
exclude: /node_modules/,
loader: 'babel',
query: {
cacheDirectory: true,
plugins: ['transform-runtime'],
presets: ['es2015', 'react', 'stage-0'],
},
},
{
test: /\.scss$/,
exclude: /styles/,
loaders: [
'style',
'css?sourceMap&-minimize&modules&importLoaders=2&localIdentName=[name]__[local]___[hash:base64:5]',
'postcss',
'sass?sourceMap',
],
},
{
test: /\.css$/,
loader: 'style!css?modules',
include: /flexboxgrid/,
},
{test: /\.(png|jpg)$/, loader: 'url?limit=8192'},
],
},
resolve: {
root: path.join(__dirname, './src'),
extensions: ['', '.jsx', '.js', '.json'],
fallback: [
path.join(__dirname, './src/styles/img'),
],
alias: {
store: path.join(__dirname, './src/store'),
containers: path.join(__dirname, './src/containers'),
services: path.join(__dirname, './src/services'),
layouts: path.join(__dirname, './src/layouts'),
components: path.join(__dirname, './src/components'),
},
},
};