-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.docs.js
50 lines (40 loc) · 1.1 KB
/
webpack.config.docs.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
var path = require("path");
var myConfig = require("./webpack.config.js");
myConfig.output.filename = "[name].js";
myConfig.module.loaders = myConfig.module.loaders.concat([
{
test: /\.jpg$/,
loader: "file-loader"
},
{
test: /\.png$/,
loader: "url-loader?mimetype=image/png"
},
{
test: /\.md/,
loaders: ["html", "remarkable"]
}
]);
myConfig.entry = {
"asme-home": "./docs/index.js",
"asme-documentation": "./docs/documentation.js"
};
/*myConfig.externals = {
"d3": "d3"
} // removing React external since 0.14 is not published yet, still in alpha 2
*/
myConfig.remarkable = {
preset: "full",
html: true,
linkify: true,
typographer: true
};
var CommonsChunkPlugin = require("webpack/lib/optimize/CommonsChunkPlugin");
myConfig.plugins.push(new CommonsChunkPlugin({
name: "asme-docs-core",
minChunks: Infinity
}));
myConfig.resolve.root = [__dirname, path.join(__dirname, "docs")];
myConfig.devtool = "sourcemap"; // "sourcemap", "sourcemap-inline", "eval";
myConfig.debug = true;
module.exports = myConfig;