forked from prateekbh/preact-material-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
35 lines (34 loc) · 878 Bytes
/
webpack.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
/* globals module, require, __dirname */
const webpack = require("webpack");
const CssMigrationWebpackPlugin = require("./CssMigrationWebpackPlugin");
const WebpackShellPlugin = require("webpack-shell-plugin");
module.exports = {
entry: "./index.js",
output: {
path: __dirname + "/dist",
filename: "index.js",
libraryTarget: "umd"
},
module: {
rules: [
{
loader: "babel-loader",
test: /\.(js|jsx)$/,
exclude: /node_modules\/proptypes|scripts\/sw.js/,
options: {
presets: [["es2015", { modules: false }]],
plugins: [
["transform-react-jsx", { pragma: "h" }],
"transform-object-rest-spread"
]
}
}
]
},
plugins: [
new CssMigrationWebpackPlugin(),
new WebpackShellPlugin({
onBuildEnd: ["node compileComponents.js"]
})
]
};