-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.demo.js
58 lines (57 loc) · 1.53 KB
/
webpack.config.demo.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
var webpack = require("webpack");
var path = require("path");
var CommonsChunkPlugin = require("webpack/lib/optimize/CommonsChunkPlugin");
module.exports = {
context: __dirname,
entry: {
lib: "./demo/demo.js"
},
output: {
path: path.join(__dirname, "build/"),
filename: "portfolio-demo.js",
publicPath: "js/",
library: "Portfolio-Demo",
libraryTarget: "umd",
},
module: {
loaders: [
{
test: /\.json$/,
loader: "json"
},
{
test: /\.(js|jsx)$/,
loaders: ["babel"],
exclude: /node_modules/
},
{
test: /\.scss$/,
loaders: ["style", "css", "autoprefixer", "sass?outputStyle=expanded"]
},
]
},
plugins: [
new webpack.NoErrorsPlugin(),
// new CommonsChunkPlugin("vendor", "vendor.bundle.js")
/*,
new webpack.ContextReplacementPlugin(/colors$/, /^$/),
new webpack.IgnorePlugin(/(dtrace-provider)|(source-map-support)$/)*/
],
externals: {
"react": "React",
"d3": "d3",
"weavecore": ["weavecore", "WeaveAPI"],
"Portfolio": "Portfolio"
},
resolve: {
// ReStock: "src/",
// root: [__dirname, path.join(__dirname, "src"), path.join(__dirname, "docs")],
extensions: ["", ".js", ".jsx", ".scss", ".md"]
}
/*,
node: {
fs: "empty",
"dtrace-provider": "empty",
"source-map-support": "empty"
}*/
};