@nuxt/rspack-builder-nightly 4.6.0-29776167.796cdae2 → 4.6.0-29778602.bfddf2f0
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.
- package/dist/index.mjs +45 -3
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -350,7 +350,7 @@ var SSRStylesPlugin = class {
|
|
|
350
350
|
const stylesSource = ["const interopDefault = r => r.default || r || []", `export default ${genObjectFromRawEntries(Object.entries(emitted).map(([key, value]) => [key, `() => import('./${value}').then(interopDefault)`]))}`].join("\n");
|
|
351
351
|
compilation.emitAsset("styles.mjs", new rawSource(stylesSource));
|
|
352
352
|
const stylesPath = resolve(this.nuxt.options.buildDir, "dist/server/styles.mjs");
|
|
353
|
-
setBuildOutput("ssrStyles", () => `export { default } from ${JSON.stringify(stylesPath)}`, this.nuxt);
|
|
353
|
+
setBuildOutput("ssrStyles", () => [`export { default } from ${JSON.stringify(stylesPath)}`, "export const inlinedCSS = {}"].join("\n"), this.nuxt);
|
|
354
354
|
const entryIds = Array.from(this.chunksWithInlinedCSS).filter((id) => entryModules.has(id));
|
|
355
355
|
setBuildOutput("entryIds", () => `export default ${JSON.stringify(entryIds)}`, this.nuxt);
|
|
356
356
|
});
|
|
@@ -792,10 +792,49 @@ function basePlugins(ctx) {
|
|
|
792
792
|
ctx.config.plugins.push(new StripInvalidPureAnnotationsPlugin());
|
|
793
793
|
}
|
|
794
794
|
}
|
|
795
|
+
/**
|
|
796
|
+
* Pin the packages that hold global vue state (`currentInstance`, reactivity
|
|
797
|
+
* internals, injection keys) to a single resolved entry, mirroring vite's
|
|
798
|
+
* `resolve.dedupe: ['vue']`.
|
|
799
|
+
*/
|
|
800
|
+
function vueAliases(ctx) {
|
|
801
|
+
const aliases = {};
|
|
802
|
+
const from = [
|
|
803
|
+
directoryToURL(ctx.nuxt.options.rootDir),
|
|
804
|
+
directoryToURL(ctx.nuxt.options.workspaceDir),
|
|
805
|
+
import.meta.url
|
|
806
|
+
];
|
|
807
|
+
const conditions = ctx.isServer ? [
|
|
808
|
+
"node",
|
|
809
|
+
"import",
|
|
810
|
+
"default"
|
|
811
|
+
] : [
|
|
812
|
+
"browser",
|
|
813
|
+
"import",
|
|
814
|
+
"default"
|
|
815
|
+
];
|
|
816
|
+
for (const pkg of [
|
|
817
|
+
"@vue/runtime-core",
|
|
818
|
+
"@vue/runtime-dom",
|
|
819
|
+
"@vue/reactivity",
|
|
820
|
+
"@vue/shared",
|
|
821
|
+
"@vue/runtime-vapor",
|
|
822
|
+
"vue-router"
|
|
823
|
+
]) {
|
|
824
|
+
const entry = resolveModulePath(pkg, {
|
|
825
|
+
from,
|
|
826
|
+
conditions,
|
|
827
|
+
try: true
|
|
828
|
+
});
|
|
829
|
+
if (entry) aliases[`${pkg}$`] = entry;
|
|
830
|
+
}
|
|
831
|
+
return aliases;
|
|
832
|
+
}
|
|
795
833
|
function baseAlias(ctx) {
|
|
796
834
|
ctx.alias = {
|
|
797
835
|
"#app": ctx.options.appDir,
|
|
798
836
|
[basename(ctx.nuxt.options.dir.assets)]: resolve(ctx.nuxt.options.srcDir, ctx.nuxt.options.dir.assets),
|
|
837
|
+
...vueAliases(ctx),
|
|
799
838
|
...ctx.options.alias,
|
|
800
839
|
...ctx.alias
|
|
801
840
|
};
|
|
@@ -845,10 +884,13 @@ function baseResolve(ctx) {
|
|
|
845
884
|
".json",
|
|
846
885
|
".vue"
|
|
847
886
|
],
|
|
848
|
-
alias: ctx.alias,
|
|
849
887
|
modules: resolveModules,
|
|
850
888
|
fullySpecified: false,
|
|
851
|
-
...ctx.config.resolve
|
|
889
|
+
...ctx.config.resolve,
|
|
890
|
+
alias: {
|
|
891
|
+
...ctx.alias,
|
|
892
|
+
...ctx.config.resolve?.alias
|
|
893
|
+
}
|
|
852
894
|
};
|
|
853
895
|
ctx.config.resolveLoader = {
|
|
854
896
|
modules: resolveLoaderModules,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/rspack-builder-nightly",
|
|
3
|
-
"version": "4.6.0-
|
|
3
|
+
"version": "4.6.0-29778602.bfddf2f0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@nuxt/friendly-errors-webpack-plugin": "^2.6.0",
|
|
27
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.6.0-
|
|
27
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.6.0-29778602.bfddf2f0",
|
|
28
28
|
"@rsbuild/core": "~2.1.9",
|
|
29
29
|
"@vue/compiler-sfc": "3.5.40",
|
|
30
30
|
"autoprefixer": "^10.5.4",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"webpackbar": "^7.0.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.6.0-
|
|
66
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.6.0-29778602.bfddf2f0",
|
|
67
67
|
"@types/webpack-bundle-analyzer": "4.7.0",
|
|
68
68
|
"h3": "1.15.11",
|
|
69
69
|
"h3-next": "npm:h3@2.0.1-rc.26",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"vue": "^3.5.40"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"nuxt": "npm:nuxt-nightly@4.6.0-
|
|
75
|
+
"nuxt": "npm:nuxt-nightly@4.6.0-29778602.bfddf2f0",
|
|
76
76
|
"vue": "^3.3.4"
|
|
77
77
|
},
|
|
78
78
|
"engines": {
|