@startupjs/bundler 0.45.1 → 0.45.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/webpack.web.config.js +13 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startupjs/bundler",
|
|
3
|
-
"version": "0.45.
|
|
3
|
+
"version": "0.45.2",
|
|
4
4
|
"description": "Opinionated scripts and configs to develop a react-native-web project",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"assets-webpack-plugin": "^7.1.1",
|
|
27
27
|
"autoprefixer": "^10.4.0",
|
|
28
28
|
"babel-loader": "^8.2.3",
|
|
29
|
-
"babel-preset-startupjs": "^0.45.
|
|
29
|
+
"babel-preset-startupjs": "^0.45.2",
|
|
30
30
|
"css-loader": "^6.5.0",
|
|
31
31
|
"css-minimizer-webpack-plugin": "^3.1.1",
|
|
32
32
|
"file-loader": "^6.2.0",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"react-native-svg": ">= 12.1.0"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "5d0135b195e79bed0d67a4138b60aa7b665d2195"
|
|
54
54
|
}
|
package/webpack.web.config.js
CHANGED
|
@@ -59,6 +59,18 @@ module.exports = function getConfig (env, {
|
|
|
59
59
|
forceCompileModules = forceCompileModules
|
|
60
60
|
.concat(getPluginsForceCompileList())
|
|
61
61
|
|
|
62
|
+
/**
|
|
63
|
+
* path.normalize needs because webpack for Windows doesn't accept paths in
|
|
64
|
+
* *nix format (with slash delemeter) in the include section.
|
|
65
|
+
* replaceAll('\\', '\\\\') needs for masking backslash in Windows-style paths
|
|
66
|
+
* in the regular expression
|
|
67
|
+
*/
|
|
68
|
+
const forceCompileModulesExpression = new RegExp(`${
|
|
69
|
+
path.normalize('node_modules/')
|
|
70
|
+
}(?:react-native-(?!web)|${
|
|
71
|
+
forceCompileModules.map(v => path.normalize(v)).join('|')
|
|
72
|
+
})`.replaceAll('\\', '\\\\'))
|
|
73
|
+
|
|
62
74
|
return pickBy({
|
|
63
75
|
mode: PROD ? 'production' : 'development',
|
|
64
76
|
entry: {
|
|
@@ -204,7 +216,7 @@ module.exports = function getConfig (env, {
|
|
|
204
216
|
resolve: {
|
|
205
217
|
fullySpecified: false
|
|
206
218
|
},
|
|
207
|
-
include:
|
|
219
|
+
include: forceCompileModulesExpression,
|
|
208
220
|
use: [
|
|
209
221
|
{ loader: 'babel-loader' }
|
|
210
222
|
]
|