Skip to content

Commit 08093b5

Browse files
committed
cat patches/webpack.config.js.prod.patch | patch -p1
1 parent eefe226 commit 08093b5

File tree

2 files changed

+80
-1
lines changed

2 files changed

+80
-1
lines changed

patches/webpack.config.js.prod.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 20:46:59.991225832 +0100
2+
+++ b/webpack.config.js 2017-11-03 20:46:36.494558186 +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+
@@ -539,6 +540,9 @@
11+
"main"
12+
]
13+
},
14+
+ "externals": [
15+
+ resolveExternals
16+
+ ],
17+
"resolveLoader": {
18+
"modules": [
19+
"./node_modules",
20+
@@ -985,6 +989,9 @@
21+
"sourceMap": false,
22+
"tsConfigPath": "src/tsconfig.app.json",
23+
"compilerOptions": {}
24+
+ }),
25+
+ new webpack.ProvidePlugin({
26+
+ __extends: 'typescript-extends'
27+
})
28+
],
29+
"node": {
30+
@@ -996,9 +1003,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');
@@ -85,6 +86,9 @@ module.exports = {
8586
"main"
8687
]
8788
},
89+
"externals": [
90+
resolveExternals
91+
],
8892
"resolveLoader": {
8993
"modules": [
9094
"./node_modules",
@@ -542,6 +546,9 @@ module.exports = {
542546
"sourceMap": false,
543547
"tsConfigPath": "src/tsconfig.app.json",
544548
"compilerOptions": {}
549+
}),
550+
new webpack.ProvidePlugin({
551+
__extends: 'typescript-extends'
545552
})
546553
],
547554
"node": {
@@ -553,9 +560,25 @@ module.exports = {
553560
"process": true,
554561
"module": false,
555562
"clearImmediate": false,
556-
"setImmediate": false
563+
"setImmediate": false,
564+
"__dirname": true
557565
},
558566
"devServer": {
559567
"historyApiFallback": true
560568
}
561569
};
570+
571+
function resolveExternals(context, request, callback) {
572+
return resolveMeteor(request, callback) ||
573+
callback();
574+
}
575+
576+
function resolveMeteor(request, callback) {
577+
var match = request.match(/^meteor\/(.+)$/);
578+
var pack = match && match[1];
579+
580+
if (pack) {
581+
callback(null, 'Package["' + pack + '"]');
582+
return true;
583+
}
584+
}

0 commit comments

Comments
 (0)