@nuxt/vite-builder-nightly 4.2.3-29430329.ec16da17 → 4.2.3-29430410.6b7fc747

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 +22 -15
  2. package/package.json +4 -4
package/dist/index.mjs CHANGED
@@ -569,6 +569,7 @@ async function writeDevServer(nuxt) {
569
569
  }
570
570
 
571
571
  const PREFIX = "virtual:public?";
572
+ const PREFIX_RE = /^virtual:public\?/;
572
573
  const CSS_URL_RE = /url\((\/[^)]+)\)/g;
573
574
  const CSS_URL_SINGLE_RE = /url\(\/[^)]+\)/;
574
575
  const RENDER_CHUNK_RE = /(?<= = )['"`]/;
@@ -606,18 +607,21 @@ const PublicDirsPlugin = (options) => {
606
607
  },
607
608
  load: {
608
609
  order: "pre",
610
+ filter: {
611
+ id: PREFIX_RE
612
+ },
609
613
  handler(id) {
610
- if (id.startsWith(PREFIX)) {
611
- return `import { publicAssetsURL } from '#internal/nuxt/paths';export default publicAssetsURL(${JSON.stringify(decodeURIComponent(id.slice(PREFIX.length)))})`;
612
- }
614
+ return `import { publicAssetsURL } from '#internal/nuxt/paths';export default publicAssetsURL(${JSON.stringify(decodeURIComponent(id.slice(PREFIX.length)))})`;
613
615
  }
614
616
  },
615
617
  resolveId: {
616
618
  order: "post",
617
- handler(id) {
618
- if (id === "/__skip_vite" || id[0] !== "/" || id.startsWith("/@fs")) {
619
- return;
619
+ filter: {
620
+ id: {
621
+ exclude: [/^\/__skip_vite$/, /^[^/]/, /^\/@fs/]
620
622
  }
623
+ },
624
+ handler(id) {
621
625
  if (resolveFromPublicAssets(id)) {
622
626
  return PREFIX + encodeURIComponent(id);
623
627
  }
@@ -1657,14 +1661,12 @@ function SSRStylesPlugin(nuxt) {
1657
1661
  if (options.shouldInline === false || typeof options.shouldInline === "function" && !options.shouldInline(importer)) {
1658
1662
  return;
1659
1663
  }
1660
- if (id === "#build/css" || id.endsWith(".vue") || isCSS(id)) {
1661
- const res = await this.resolve(id, importer, { ..._options, skipSelf: true });
1662
- if (res) {
1663
- return {
1664
- ...res,
1665
- moduleSideEffects: false
1666
- };
1667
- }
1664
+ const res = await this.resolve(id, importer, { ..._options, skipSelf: true });
1665
+ if (res) {
1666
+ return {
1667
+ ...res,
1668
+ moduleSideEffects: false
1669
+ };
1668
1670
  }
1669
1671
  }
1670
1672
  },
@@ -1987,7 +1989,12 @@ function EnvironmentsPlugin(nuxt) {
1987
1989
  {
1988
1990
  name: "nuxt:client:aliases",
1989
1991
  enforce: "post",
1990
- resolveId: (source) => clientAliases[source]
1992
+ resolveId: {
1993
+ filter: {
1994
+ id: Object.keys(clientAliases).map((id) => new RegExp("^" + escapeStringRegexp(id) + "$"))
1995
+ },
1996
+ handler: (source) => clientAliases[source]
1997
+ }
1991
1998
  }
1992
1999
  ];
1993
2000
  } else if (environment.name === "ssr") ;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/vite-builder-nightly",
3
- "version": "4.2.3-29430329.ec16da17",
3
+ "version": "4.2.3-29430410.6b7fc747",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",
@@ -21,7 +21,7 @@
21
21
  "dist"
22
22
  ],
23
23
  "devDependencies": {
24
- "@nuxt/schema": "npm:@nuxt/schema-nightly@4.2.3-29430329.ec16da17",
24
+ "@nuxt/schema": "npm:@nuxt/schema-nightly@4.2.3-29430410.6b7fc747",
25
25
  "nitropack": "2.12.9",
26
26
  "rolldown": "1.0.0-beta.53",
27
27
  "rollup": "4.53.3",
@@ -29,7 +29,7 @@
29
29
  "vue": "3.5.25"
30
30
  },
31
31
  "dependencies": {
32
- "@nuxt/kit": "npm:@nuxt/kit-nightly@4.2.3-29430329.ec16da17",
32
+ "@nuxt/kit": "npm:@nuxt/kit-nightly@4.2.3-29430410.6b7fc747",
33
33
  "@rollup/plugin-replace": "^6.0.3",
34
34
  "@vitejs/plugin-vue": "^6.0.2",
35
35
  "@vitejs/plugin-vue-jsx": "^5.1.2",
@@ -61,7 +61,7 @@
61
61
  "vue-bundle-renderer": "^2.2.0"
62
62
  },
63
63
  "peerDependencies": {
64
- "nuxt": "npm:nuxt-nightly@4.2.3-29430329.ec16da17",
64
+ "nuxt": "npm:nuxt-nightly@4.2.3-29430410.6b7fc747",
65
65
  "rolldown": "^1.0.0-beta.38",
66
66
  "vue": "^3.3.4"
67
67
  },