forked from Bahmni/form-controls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.test.config.js
69 lines (67 loc) · 1.55 KB
/
webpack.test.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
'use strict';
let path = require('path');
let webpack = require('webpack');
let srcPath = path.join(__dirname, './src');
module.exports = {
devtool: 'cheap-module-source-map',
entry: {
helpers: ['./src/helpers/componentStore.js', './src/helpers/formRenderer.js'],
bundle: './src/index.jsx'
},
externals: {
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': true,
'react/addons': true
},
module: {
loaders: [
{
test: /\.(js|jsx)$/,
loaders: ['babel'],
include: path.join(__dirname, 'src')
},
{
test: /\.js$/,
loaders: ['babel-loader'],
include: path.join(__dirname, 'test')
},
{
test: /\.json$/,
loader: 'json'
},
{
test: /\.scss$/,
loaders: ["style", "css", "sass"]
},
{
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"
},
{
test: /\.(jpe?g|png|gif|svg)$/i,
loader: 'file-loader?name=/styles/images/[name].[ext]',
},
],
preLoaders: [
{
test: /\.(js|jsx)$/,
include: path.join(__dirname, 'src'),
loader: 'isparta',
exclude: [
/helpers\/ControlRecordTreeMgr\.js/,
/ControlState\.js/,
],
},
]
},
resolve: {
alias: {
components: srcPath + '/components/',
src: srcPath
}
}
};