@nuxt/rspack-builder-nightly 4.0.0-29149033.e2231597 → 4.0.0-29149118.62afcd5f

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.
Files changed (2) hide show
  1. package/dist/index.mjs +4 -3
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -1016,7 +1016,7 @@ function serverPlugins(ctx) {
1016
1016
 
1017
1017
  const PLUGIN_NAME = "dynamic-require";
1018
1018
  const HELPER_DYNAMIC = `\0${PLUGIN_NAME}.mjs`;
1019
- const DYNAMIC_REQUIRE_RE = /import\((?:.*\+\s*)?"\.\/" ?\+(.*)\).then/g;
1019
+ const DYNAMIC_REQUIRE_RE = /import\([^)]*\+\s*(__webpack_require__[^+]*)\).then/g;
1020
1020
  const BACKWARD_SLASH_RE = /\\/g;
1021
1021
  function dynamicRequire({ dir, ignore, inline }) {
1022
1022
  const filesToIgnore = new Set(ignore);
@@ -1125,9 +1125,10 @@ const bundle = async (nuxt) => {
1125
1125
  for (const plugins of [prerenderRollupPlugins, rollupPlugins]) {
1126
1126
  const existingPlugin = plugins.findIndex((i) => i && "name" in i && i.name === "dynamic-require");
1127
1127
  if (existingPlugin >= 0) {
1128
- plugins.splice(existingPlugin, 1);
1128
+ plugins.splice(existingPlugin, 1, dynamicRequirePlugin);
1129
+ } else {
1130
+ plugins.push(dynamicRequirePlugin);
1129
1131
  }
1130
- plugins.push(dynamicRequirePlugin);
1131
1132
  }
1132
1133
  }
1133
1134
  await nuxt.callHook(`${builder}:config`, webpackConfigs);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/rspack-builder-nightly",
3
- "version": "4.0.0-29149033.e2231597",
3
+ "version": "4.0.0-29149118.62afcd5f",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",
@@ -27,7 +27,7 @@
27
27
  ],
28
28
  "dependencies": {
29
29
  "@nuxt/friendly-errors-webpack-plugin": "^2.6.0",
30
- "@nuxt/kit": "npm:@nuxt/kit-nightly@4.0.0-29149033.e2231597",
30
+ "@nuxt/kit": "npm:@nuxt/kit-nightly@4.0.0-29149118.62afcd5f",
31
31
  "@rspack/core": "^1.3.13",
32
32
  "autoprefixer": "^10.4.21",
33
33
  "css-loader": "^7.1.2",
@@ -67,7 +67,7 @@
67
67
  "webpackbar": "^7.0.0"
68
68
  },
69
69
  "devDependencies": {
70
- "@nuxt/schema": "npm:@nuxt/schema-nightly@4.0.0-29149033.e2231597",
70
+ "@nuxt/schema": "npm:@nuxt/schema-nightly@4.0.0-29149118.62afcd5f",
71
71
  "@types/webpack-bundle-analyzer": "4.7.0",
72
72
  "@types/webpack-hot-middleware": "2.25.9",
73
73
  "rollup": "4.41.1",