@startupjs/bundler 0.45.0 → 0.45.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startupjs/bundler",
3
- "version": "0.45.0",
3
+ "version": "0.45.3",
4
4
  "description": "Opinionated scripts and configs to develop a react-native-web project",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
@@ -21,12 +21,12 @@
21
21
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.1",
22
22
  "@startupjs/babel-plugin-react-css-modules": "^6.5.4-1",
23
23
  "@startupjs/css-to-react-native-transform": "^1.9.0-1",
24
- "@startupjs/plugin": "^0.45.0",
24
+ "@startupjs/plugin": "^0.45.1",
25
25
  "@svgr/webpack": "~5.5.0",
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.0",
29
+ "babel-preset-startupjs": "^0.45.3",
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": "37272e27715f70b8d221b2e98ffccb39fda7a35d"
53
+ "gitHead": "eacf84afc5987c24165f25421d850b2dd3311786"
54
54
  }
@@ -59,6 +59,19 @@ 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
+ })`.replace(/\\\\/, '\\\\')
73
+ )
74
+
62
75
  return pickBy({
63
76
  mode: PROD ? 'production' : 'development',
64
77
  entry: {
@@ -204,7 +217,7 @@ module.exports = function getConfig (env, {
204
217
  resolve: {
205
218
  fullySpecified: false
206
219
  },
207
- include: new RegExp(`node_modules/(?:react-native-(?!web)|${forceCompileModules.join('|')})`),
220
+ include: forceCompileModulesExpression,
208
221
  use: [
209
222
  { loader: 'babel-loader' }
210
223
  ]