Skip to content

Commit 132186c

Browse files
committed
cat patches/webpack.config.js.patch | patch -p1
1 parent 5ede928 commit 132186c

File tree

2 files changed

+80
-1
lines changed

2 files changed

+80
-1
lines changed

patches/webpack.config.js.patch

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
--- a/webpack.config.js 2017-11-03 19:41:59.847729765 +0100
2+
+++ b/webpack.config.js 2017-11-03 19:41:00.897727305 +0100
3+
@@ -1,5 +1,6 @@
4+
const fs = require('fs');
5+
const path = require('path');
6+
+const webpack = require('webpack');
7+
const CopyWebpackPlugin = require('copy-webpack-plugin');
8+
const ProgressPlugin = require('webpack/lib/ProgressPlugin');
9+
const CircularDependencyPlugin = require('circular-dependency-plugin');
10+
@@ -536,6 +537,9 @@
11+
"main"
12+
]
13+
},
14+
+ "externals": [
15+
+ resolveExternals
16+
+ ],
17+
"resolveLoader": {
18+
"modules": [
19+
"./node_modules",
20+
@@ -917,6 +921,9 @@
21+
"tsConfigPath": "src/tsconfig.app.json",
22+
"skipCodeGeneration": true,
23+
"compilerOptions": {}
24+
+ }),
25+
+ new webpack.ProvidePlugin({
26+
+ __extends: 'typescript-extends'
27+
})
28+
],
29+
"node": {
30+
@@ -928,9 +935,25 @@
31+
"process": true,
32+
"module": false,
33+
"clearImmediate": false,
34+
- "setImmediate": false
35+
+ "setImmediate": false,
36+
+ "__dirname": true
37+
},
38+
"devServer": {
39+
"historyApiFallback": true
40+
}
41+
};
42+
+
43+
+function resolveExternals(context, request, callback) {
44+
+ return resolveMeteor(request, callback) ||
45+
+ callback();
46+
+}
47+
+
48+
+function resolveMeteor(request, callback) {
49+
+ var match = request.match(/^meteor\/(.+)$/);
50+
+ var pack = match && match[1];
51+
+
52+
+ if (pack) {
53+
+ callback(null, 'Package["' + pack + '"]');
54+
+ return true;
55+
+ }
56+
+}

webpack.config.js

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const fs = require('fs');
22
const path = require('path');
3+
const webpack = require('webpack');
34
const CopyWebpackPlugin = require('copy-webpack-plugin');
45
const ProgressPlugin = require('webpack/lib/ProgressPlugin');
56
const CircularDependencyPlugin = require('circular-dependency-plugin');
@@ -87,6 +88,9 @@ module.exports = {
8788
"main"
8889
]
8990
},
91+
"externals": [
92+
resolveExternals
93+
],
9094
"resolveLoader": {
9195
"modules": [
9296
"./node_modules",
@@ -481,6 +485,9 @@ module.exports = {
481485
"tsConfigPath": "src/tsconfig.app.json",
482486
"skipCodeGeneration": true,
483487
"compilerOptions": {}
488+
}),
489+
new webpack.ProvidePlugin({
490+
__extends: 'typescript-extends'
484491
})
485492
],
486493
"node": {
@@ -492,9 +499,25 @@ module.exports = {
492499
"process": true,
493500
"module": false,
494501
"clearImmediate": false,
495-
"setImmediate": false
502+
"setImmediate": false,
503+
"__dirname": true
496504
},
497505
"devServer": {
498506
"historyApiFallback": true
499507
}
500508
};
509+
510+
function resolveExternals(context, request, callback) {
511+
return resolveMeteor(request, callback) ||
512+
callback();
513+
}
514+
515+
function resolveMeteor(request, callback) {
516+
var match = request.match(/^meteor\/(.+)$/);
517+
var pack = match && match[1];
518+
519+
if (pack) {
520+
callback(null, 'Package["' + pack + '"]');
521+
return true;
522+
}
523+
}

0 commit comments

Comments
 (0)