@nuxt/vite-builder-nightly 4.1.3-29310393.7b2ff488 → 4.1.3-29310511.cb2b9d5f

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 +8 -4
  2. package/package.json +10 -3
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import * as vite from 'vite';
3
3
  import { isCSSRequest, createLogger } from 'vite';
4
4
  import { dirname, normalize, resolve, join, relative, basename, isAbsolute } from 'pathe';
5
5
  import { useNitro, logger, useNuxt, resolvePath, getLayerDirectories, createIsIgnored, addVitePlugin } from '@nuxt/kit';
6
- import replace from '@rollup/plugin-replace';
6
+ import replacePlugin from '@rollup/plugin-replace';
7
7
  import { findStaticImports, sanitizeFilePath } from 'mlly';
8
8
  import { parseURL, parseQuery, joinURL, getQuery, withLeadingSlash, withTrailingSlash, withoutLeadingSlash, withoutBase } from 'ufo';
9
9
  import { filename as filename$1 } from 'pathe/utils';
@@ -1819,15 +1819,19 @@ const bundle = async (nuxt) => {
1819
1819
  }), { server: nuxt.options.ssr });
1820
1820
  }
1821
1821
  await nuxt.callHook("vite:extend", ctx);
1822
- nuxt.hook("vite:extendConfig", (config) => {
1822
+ nuxt.hook("vite:extendConfig", async (config) => {
1823
1823
  const replaceOptions = /* @__PURE__ */ Object.create(null);
1824
- replaceOptions.preventAssignment = true;
1825
1824
  for (const key in config.define) {
1826
1825
  if (key.startsWith("import.meta.")) {
1827
1826
  replaceOptions[key] = config.define[key];
1828
1827
  }
1829
1828
  }
1830
- config.plugins.push(replace(replaceOptions));
1829
+ if (vite.rolldownVersion) {
1830
+ const { replacePlugin: replacePlugin2 } = await import('rolldown/experimental');
1831
+ config.plugins.push(replacePlugin2(replaceOptions));
1832
+ } else {
1833
+ config.plugins.push(replacePlugin({ ...replaceOptions, preventAssignment: true }));
1834
+ }
1831
1835
  });
1832
1836
  if (!nuxt.options.dev) {
1833
1837
  const chunksWithInlinedCSS = /* @__PURE__ */ new Set();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/vite-builder-nightly",
3
- "version": "4.1.3-29310393.7b2ff488",
3
+ "version": "4.1.3-29310511.cb2b9d5f",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",
@@ -21,14 +21,15 @@
21
21
  "dist"
22
22
  ],
23
23
  "devDependencies": {
24
- "@nuxt/schema": "npm:@nuxt/schema-nightly@4.1.3-29310393.7b2ff488",
24
+ "@nuxt/schema": "npm:@nuxt/schema-nightly@4.1.3-29310511.cb2b9d5f",
25
25
  "nitropack": "2.12.6",
26
+ "rolldown": "1.0.0-beta.38",
26
27
  "rollup": "4.50.2",
27
28
  "unbuild": "3.6.1",
28
29
  "vue": "3.5.21"
29
30
  },
30
31
  "dependencies": {
31
- "@nuxt/kit": "npm:@nuxt/kit-nightly@4.1.3-29310393.7b2ff488",
32
+ "@nuxt/kit": "npm:@nuxt/kit-nightly@4.1.3-29310511.cb2b9d5f",
32
33
  "@rollup/plugin-replace": "^6.0.2",
33
34
  "@vitejs/plugin-vue": "^6.0.1",
34
35
  "@vitejs/plugin-vue-jsx": "^5.1.1",
@@ -59,8 +60,14 @@
59
60
  "vue-bundle-renderer": "^2.1.2"
60
61
  },
61
62
  "peerDependencies": {
63
+ "rolldown": "^1.0.0-beta.38",
62
64
  "vue": "^3.3.4"
63
65
  },
66
+ "peerDependenciesMeta": {
67
+ "rolldown": {
68
+ "optional": true
69
+ }
70
+ },
64
71
  "engines": {
65
72
  "node": "^20.19.0 || >=22.12.0"
66
73
  },