forked from webpack/webpack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWebpackOptionsDefaulter.js
More file actions
57 lines (45 loc) · 2.03 KB
/
WebpackOptionsDefaulter.js
File metadata and controls
57 lines (45 loc) · 2.03 KB
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
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
var OptionsDefaulter = require("webpack-core/lib/OptionsDefaulter");
function WebpackOptionsDefaulter() {
OptionsDefaulter.call(this);
this.set("debug", false);
this.set("devtool", false);
this.set("context", process.cwd());
this.set("target", "web");
this.set("output", {});
this.set("node", {});
this.set("optimize", {});
this.set("resolve", {});
this.set("resolveLoader", {});
this.set("output.libraryTarget", "var");
this.set("output.path", "");
this.set("output.sourceMapFilename", "[file].map");
this.set("output.hotUpdateChunkFilename", "[id].[hash].hot-update.js");
this.set("output.hotUpdateMainFilename", "[hash].hot-update.json");
this.set("output.hashFunction", "md5");
this.set("output.hashDigest", "hex");
this.set("output.hashDigestLength", 20);
this.set("node.console", false);
this.set("node.process", true);
this.set("node.global", true);
this.set("node.buffer", true);
this.set("node.__filename", "mock");
this.set("node.__dirname", "mock");
this.set("resolve.fastUnsafe", []);
this.set("resolveLoader.fastUnsafe", []);
this.set("resolve.modulesDirectories", ["web_modules", "node_modules"]);
this.set("resolveLoader.modulesDirectories", ["web_loaders", "web_modules", "node_loaders", "node_modules"]);
this.set("resolveLoader.moduleTemplates", ["*-webpack-loader", "*-web-loader", "*-loader", "*"]);
this.set("resolve.alias", {});
this.set("resolveLoader.alias", {});
this.set("resolve.extensions", ["", ".webpack.js", ".web.js", ".js"]);
this.set("resolveLoader.extensions", ["", ".webpack-loader.js", ".web-loader.js", ".loader.js", ".js"]);
this.set("resolve.packageMains", ["webpack", "browser", "web", "browserify", ["jam", "main"], "main"]);
this.set("resolveLoader.packageMains", ["webpackLoader", "webLoader", "loader", "main"]);
this.set("optimize.occurenceOrderPreferEntry", true);
}
module.exports = WebpackOptionsDefaulter;
WebpackOptionsDefaulter.prototype = Object.create(OptionsDefaulter.prototype);