forked from hugozap/react-svgmt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.test.config.js
33 lines (31 loc) · 914 Bytes
/
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
var path = require("path");
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
module.exports = {
entry: "./__tests__/testapp.js",
devtool: "eval-source-map",
output: {
path: path.resolve(__dirname, "__tests__"),
filename: "testbundle.js",
},
module: {
rules: [
{
test: /\.js$/,
include: [path.resolve(__dirname, "src"),path.resolve(__dirname, "__tests__")],
exclude: /(node_modules|bower_components|build)/,
use: {
loader: "babel-loader",
options: {
presets: ["env"],
plugins: [
require("babel-plugin-transform-react-jsx"),
require("babel-plugin-transform-class-properties"),
require("babel-plugin-transform-object-rest-spread")
]
}
}
}
]
},
// plugins: [new BundleAnalyzerPlugin()],
};