aboutsummaryrefslogtreecommitdiff
path: root/node_modules/webpack/buildin
diff options
context:
space:
mode:
authorruki <waruqi@gmail.com>2018-11-08 00:38:48 +0800
committerruki <waruqi@gmail.com>2018-11-07 21:53:09 +0800
commit26105034da4fcce7ac883c899d781f016559310d (patch)
treec459a5dc4e3aa0972d9919033ece511ce76dd129 /node_modules/webpack/buildin
parent2c77f00f1a7ecb6c8192f9c16d3b2001b254a107 (diff)
downloadxmake-docs-26105034da4fcce7ac883c899d781f016559310d.tar.gz
xmake-docs-26105034da4fcce7ac883c899d781f016559310d.zip
switch to vuepress
Diffstat (limited to 'node_modules/webpack/buildin')
-rw-r--r--node_modules/webpack/buildin/amd-define.js3
-rw-r--r--node_modules/webpack/buildin/amd-options.js2
-rw-r--r--node_modules/webpack/buildin/global.js20
-rw-r--r--node_modules/webpack/buildin/harmony-module.js24
-rw-r--r--node_modules/webpack/buildin/module.js22
-rw-r--r--node_modules/webpack/buildin/system.js7
6 files changed, 78 insertions, 0 deletions
diff --git a/node_modules/webpack/buildin/amd-define.js b/node_modules/webpack/buildin/amd-define.js
new file mode 100644
index 00000000..0d32606a
--- /dev/null
+++ b/node_modules/webpack/buildin/amd-define.js
@@ -0,0 +1,3 @@
+module.exports = function() {
+ throw new Error("define cannot be used indirect");
+};
diff --git a/node_modules/webpack/buildin/amd-options.js b/node_modules/webpack/buildin/amd-options.js
new file mode 100644
index 00000000..f7dd4753
--- /dev/null
+++ b/node_modules/webpack/buildin/amd-options.js
@@ -0,0 +1,2 @@
+/* globals __webpack_amd_options__ */
+module.exports = __webpack_amd_options__;
diff --git a/node_modules/webpack/buildin/global.js b/node_modules/webpack/buildin/global.js
new file mode 100644
index 00000000..35f3144e
--- /dev/null
+++ b/node_modules/webpack/buildin/global.js
@@ -0,0 +1,20 @@
+var g;
+
+// This works in non-strict mode
+g = (function() {
+ return this;
+})();
+
+try {
+ // This works if eval is allowed (see CSP)
+ g = g || Function("return this")() || (1, eval)("this");
+} catch (e) {
+ // This works if the window reference is available
+ if (typeof window === "object") g = window;
+}
+
+// g can still be undefined, but nothing to do about it...
+// We return undefined, instead of nothing here, so it's
+// easier to handle this case. if(!global) { ...}
+
+module.exports = g;
diff --git a/node_modules/webpack/buildin/harmony-module.js b/node_modules/webpack/buildin/harmony-module.js
new file mode 100644
index 00000000..c1614658
--- /dev/null
+++ b/node_modules/webpack/buildin/harmony-module.js
@@ -0,0 +1,24 @@
+module.exports = function(originalModule) {
+ if (!originalModule.webpackPolyfill) {
+ var module = Object.create(originalModule);
+ // module.parent = undefined by default
+ if (!module.children) module.children = [];
+ Object.defineProperty(module, "loaded", {
+ enumerable: true,
+ get: function() {
+ return module.l;
+ }
+ });
+ Object.defineProperty(module, "id", {
+ enumerable: true,
+ get: function() {
+ return module.i;
+ }
+ });
+ Object.defineProperty(module, "exports", {
+ enumerable: true
+ });
+ module.webpackPolyfill = 1;
+ }
+ return module;
+};
diff --git a/node_modules/webpack/buildin/module.js b/node_modules/webpack/buildin/module.js
new file mode 100644
index 00000000..c92808b6
--- /dev/null
+++ b/node_modules/webpack/buildin/module.js
@@ -0,0 +1,22 @@
+module.exports = function(module) {
+ if (!module.webpackPolyfill) {
+ module.deprecate = function() {};
+ module.paths = [];
+ // module.parent = undefined by default
+ if (!module.children) module.children = [];
+ Object.defineProperty(module, "loaded", {
+ enumerable: true,
+ get: function() {
+ return module.l;
+ }
+ });
+ Object.defineProperty(module, "id", {
+ enumerable: true,
+ get: function() {
+ return module.i;
+ }
+ });
+ module.webpackPolyfill = 1;
+ }
+ return module;
+};
diff --git a/node_modules/webpack/buildin/system.js b/node_modules/webpack/buildin/system.js
new file mode 100644
index 00000000..9ba70a38
--- /dev/null
+++ b/node_modules/webpack/buildin/system.js
@@ -0,0 +1,7 @@
+// Provide a "System" global.
+module.exports = {
+ // Make sure import is only used as "System.import"
+ import: function() {
+ throw new Error("System.import cannot be used indirectly");
+ }
+};