@nuxt/webpack-builder-nightly 4.4.3-29561554.e9b2fa64 → 4.4.3-29571486.e4b31efa

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 +21 -5
  2. package/package.json +5 -5
package/dist/index.mjs CHANGED
@@ -971,9 +971,23 @@ async function createPostcssLoadersRule(ctx) {
971
971
  var VueSSRClientPlugin = class {
972
972
  serverDist;
973
973
  nuxt;
974
+ precomputedCode = "export default undefined";
975
+ manifestCode;
976
+ vfs = {
977
+ "client.precomputed.mjs": () => this.precomputedCode,
978
+ "client.manifest.mjs": () => this.manifestCode
979
+ };
974
980
  constructor(options) {
975
981
  this.serverDist = resolve(options.nuxt.options.buildDir, "dist/server");
976
982
  this.nuxt = options.nuxt;
983
+ const nitro = useNitro();
984
+ nitro.options.virtual ||= {};
985
+ nitro.options._config.virtual ||= {};
986
+ for (const key in this.vfs) {
987
+ const filename = `#build/dist/server/${key}`;
988
+ nitro.options.virtual[filename] = this.vfs[key];
989
+ nitro.options._config.virtual[filename] = this.vfs[key];
990
+ }
977
991
  }
978
992
  getRelativeModuleId(identifier, context) {
979
993
  const id = identifier.replace(/\s\w+$/, "");
@@ -1042,11 +1056,13 @@ var VueSSRClientPlugin = class {
1042
1056
  }
1043
1057
  const manifest = normalizeWebpackManifest(webpackManifest);
1044
1058
  await this.nuxt.callHook("build:manifest", manifest);
1045
- await mkdir(this.serverDist, { recursive: true });
1046
- const precomputed = precomputeDependencies(manifest);
1047
- await writeFile(join(this.serverDist, `client.manifest.json`), JSON.stringify(manifest, null, 2));
1048
- await writeFile(join(this.serverDist, "client.manifest.mjs"), "export default " + serialize(manifest), "utf8");
1049
- await writeFile(join(this.serverDist, "client.precomputed.mjs"), "export default " + serialize(precomputed), "utf8");
1059
+ this.precomputedCode = "export default " + serialize(precomputeDependencies(manifest));
1060
+ this.manifestCode = "export default " + serialize(manifest);
1061
+ if (!this.nuxt.options.dev && this.nuxt.options.experimental.buildCache) {
1062
+ await mkdir(this.serverDist, { recursive: true });
1063
+ await writeFile(join(this.serverDist, "client.manifest.mjs"), this.manifestCode, "utf8");
1064
+ await writeFile(join(this.serverDist, "client.precomputed.mjs"), this.precomputedCode, "utf8");
1065
+ }
1050
1066
  });
1051
1067
  }
1052
1068
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/webpack-builder-nightly",
3
- "version": "4.4.3-29561554.e9b2fa64",
3
+ "version": "4.4.3-29571486.e4b31efa",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",
@@ -25,7 +25,7 @@
25
25
  ],
26
26
  "dependencies": {
27
27
  "@nuxt/friendly-errors-webpack-plugin": "^2.6.0",
28
- "@nuxt/kit": "npm:@nuxt/kit-nightly@4.4.3-29561554.e9b2fa64",
28
+ "@nuxt/kit": "npm:@nuxt/kit-nightly@4.4.3-29571486.e4b31efa",
29
29
  "@vue/compiler-sfc": "3.5.30",
30
30
  "autoprefixer": "^10.4.27",
31
31
  "css-loader": "^7.1.4",
@@ -69,18 +69,18 @@
69
69
  "webpackbar": "^7.0.0"
70
70
  },
71
71
  "devDependencies": {
72
- "@nuxt/schema": "npm:@nuxt/schema-nightly@4.4.3-29561554.e9b2fa64",
72
+ "@nuxt/schema": "npm:@nuxt/schema-nightly@4.4.3-29571486.e4b31efa",
73
73
  "@rspack/core": "1.7.8",
74
74
  "@types/webpack-bundle-analyzer": "4.7.0",
75
75
  "@types/webpack-hot-middleware": "2.25.12",
76
76
  "h3": "1.15.6",
77
- "h3-next": "npm:h3@2.0.1-rc.16",
77
+ "h3-next": "npm:h3@2.0.1-rc.17",
78
78
  "obuild": "0.4.32",
79
79
  "rollup": "4.59.0",
80
80
  "vue": "3.5.30"
81
81
  },
82
82
  "peerDependencies": {
83
- "nuxt": "npm:nuxt-nightly@4.4.3-29561554.e9b2fa64",
83
+ "nuxt": "npm:nuxt-nightly@4.4.3-29571486.e4b31efa",
84
84
  "vue": "^3.3.4"
85
85
  },
86
86
  "engines": {