@nativescript/webpack 5.0.25 → 5.0.26-alpha.0

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.
@@ -1,5 +1,9 @@
1
1
  // VIRTUAL ENTRY START
2
2
  require('@nativescript/core/bundle-entry-points')
3
3
  const context = require.context("~/", /* deep: */ true, /* filter: */ /.(xml|js|s?css)$/);
4
- global.registerBundlerModules(context);
4
+ if (typeof global.registerBundlerModules === 'function') {
5
+ global.registerBundlerModules(context);
6
+ } else {
7
+ global.registerWebpackModules(context);
8
+ }
5
9
  // VIRTUAL ENTRY END
@@ -1,5 +1,9 @@
1
1
  // VIRTUAL ENTRY START
2
2
  require('@nativescript/core/bundle-entry-points')
3
3
  const context = require.context("~/", /* deep: */ true, /* filter: */ /\.(xml|js|(?<!\.d\.)ts|s?css)$/);
4
- global.registerBundlerModules(context);
4
+ if (typeof global.registerBundlerModules === 'function') {
5
+ global.registerBundlerModules(context);
6
+ } else {
7
+ global.registerWebpackModules(context);
8
+ }
5
9
  // VIRTUAL ENTRY END
@@ -13,7 +13,11 @@ if (typeof import.meta.glob !== 'undefined') {
13
13
  '~/**/*.@(xml|js|ts|scss|css)',
14
14
  { eager: true }, // uncomment to import immediately
15
15
  );
16
- global.registerBundlerModules(modules);
16
+ if (typeof global.registerBundlerModules === 'function') {
17
+ global.registerBundlerModules(modules);
18
+ } else {
19
+ global.registerWebpackModules(modules);
20
+ }
17
21
  } else {
18
22
  const require = createRequire(import.meta.url);
19
23
  const root = fileURLToPath(new URL('./src', import.meta.url));
@@ -63,6 +67,10 @@ if (typeof import.meta.glob !== 'undefined') {
63
67
  }
64
68
  const context = loadContextSync();
65
69
 
66
- global.registerBundlerModules(context);
70
+ if (typeof global.registerBundlerModules === 'function') {
71
+ global.registerBundlerModules(context);
72
+ } else {
73
+ global.registerWebpackModules(context);
74
+ }
67
75
  }
68
76
  // VIRTUAL ENTRY END
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nativescript/webpack",
3
- "version": "5.0.25",
3
+ "version": "5.0.26-alpha.0",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "files": [