astro 1.1.2 → 1.1.3
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/core/add/index.js +11 -11
- package/dist/core/build/internal.d.ts +5 -1
- package/dist/core/build/internal.js +1 -2
- package/dist/core/build/vite-plugin-css.js +15 -2
- package/dist/core/dev/index.js +1 -1
- package/dist/core/messages.js +2 -2
- package/dist/core/util.js +1 -1
- package/dist/runtime/server/astro-global.js +1 -1
- package/package.json +1 -1
package/dist/core/add/index.js
CHANGED
|
@@ -51,29 +51,29 @@ async function add(names, { cwd, flags, logging, telemetry }) {
|
|
|
51
51
|
["--yes", "Accept all prompts."],
|
|
52
52
|
["--help", "Show this help message."]
|
|
53
53
|
],
|
|
54
|
-
"
|
|
54
|
+
"UI Frameworks": [
|
|
55
55
|
["react", "astro add react"],
|
|
56
56
|
["preact", "astro add preact"],
|
|
57
57
|
["vue", "astro add vue"],
|
|
58
58
|
["svelte", "astro add svelte"],
|
|
59
59
|
["solid-js", "astro add solid-js"],
|
|
60
|
-
["lit", "astro add lit"]
|
|
60
|
+
["lit", "astro add lit"],
|
|
61
|
+
["alpine", "astro add alpine"]
|
|
61
62
|
],
|
|
62
|
-
"
|
|
63
|
+
"SSR Adapters": [
|
|
63
64
|
["netlify", "astro add netlify"],
|
|
64
65
|
["vercel", "astro add vercel"],
|
|
66
|
+
["deno", "astro add deno"],
|
|
65
67
|
["cloudflare", "astro add cloudflare"],
|
|
66
|
-
["
|
|
68
|
+
["node", "astro add node"]
|
|
67
69
|
],
|
|
68
|
-
|
|
70
|
+
Others: [
|
|
69
71
|
["tailwind", "astro add tailwind"],
|
|
72
|
+
["image", "astro add image"],
|
|
73
|
+
["mdx", "astro add mdx"],
|
|
70
74
|
["partytown", "astro add partytown"],
|
|
71
|
-
["sitemap", "astro add sitemap"]
|
|
72
|
-
|
|
73
|
-
"Example: Add an SSR Adapter": [
|
|
74
|
-
["netlify", "astro add netlify"],
|
|
75
|
-
["vercel", "astro add vercel"],
|
|
76
|
-
["deno", "astro add deno"]
|
|
75
|
+
["sitemap", "astro add sitemap"],
|
|
76
|
+
["prefetch", "astro add prefetch"]
|
|
77
77
|
]
|
|
78
78
|
},
|
|
79
79
|
description: `For more integrations, check out: ${cyan("https://astro.build/integrations")}`
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { OutputChunk, RenderedChunk } from 'rollup';
|
|
2
2
|
import type { PageBuildData, ViteID } from './types';
|
|
3
3
|
export interface BuildInternals {
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* The module ids of all CSS chunks, used to deduplicate CSS assets between
|
|
6
|
+
* SSR build and client build in vite-plugin-css.
|
|
7
|
+
*/
|
|
8
|
+
cssChunkModuleIds: Set<string>;
|
|
5
9
|
hoistedScriptIdToHoistedMap: Map<string, Set<string>>;
|
|
6
10
|
hoistedScriptIdToPagesMap: Map<string, Set<string>>;
|
|
7
11
|
entrySpecifierToBundleMap: Map<string, string>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { prependForwardSlash } from "../path.js";
|
|
2
2
|
import { viteID } from "../util.js";
|
|
3
3
|
function createBuildInternals() {
|
|
4
|
-
const pureCSSChunks = /* @__PURE__ */ new Set();
|
|
5
4
|
const hoistedScriptIdToHoistedMap = /* @__PURE__ */ new Map();
|
|
6
5
|
const hoistedScriptIdToPagesMap = /* @__PURE__ */ new Map();
|
|
7
6
|
return {
|
|
8
|
-
|
|
7
|
+
cssChunkModuleIds: /* @__PURE__ */ new Set(),
|
|
9
8
|
hoistedScriptIdToHoistedMap,
|
|
10
9
|
hoistedScriptIdToPagesMap,
|
|
11
10
|
entrySpecifierToBundleMap: /* @__PURE__ */ new Map(),
|
|
@@ -83,8 +83,21 @@ function rollupPluginAstroBuildCSS(options) {
|
|
|
83
83
|
if ("viteMetadata" in chunk) {
|
|
84
84
|
const meta = chunk["viteMetadata"];
|
|
85
85
|
if (meta.importedCss.size) {
|
|
86
|
+
if (options.target === "server") {
|
|
87
|
+
for (const id of Object.keys(c.modules)) {
|
|
88
|
+
internals.cssChunkModuleIds.add(id);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (options.target === "client") {
|
|
92
|
+
if (Object.keys(c.modules).every((id) => internals.cssChunkModuleIds.has(id))) {
|
|
93
|
+
for (const importedCssImport of meta.importedCss) {
|
|
94
|
+
delete bundle[importedCssImport];
|
|
95
|
+
}
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
86
99
|
if (options.target === "client") {
|
|
87
|
-
for (const
|
|
100
|
+
for (const id of Object.keys(c.modules)) {
|
|
88
101
|
for (const pageData of getParentClientOnlys(id, this)) {
|
|
89
102
|
for (const importedCssImport of meta.importedCss) {
|
|
90
103
|
pageData.css.set(importedCssImport, { depth: -1 });
|
|
@@ -92,7 +105,7 @@ function rollupPluginAstroBuildCSS(options) {
|
|
|
92
105
|
}
|
|
93
106
|
}
|
|
94
107
|
}
|
|
95
|
-
for (const
|
|
108
|
+
for (const id of Object.keys(c.modules)) {
|
|
96
109
|
for (const [pageInfo, depth] of walkParentInfos(id, this)) {
|
|
97
110
|
if (moduleIsTopLevelPage(pageInfo)) {
|
|
98
111
|
const pageViteID = pageInfo.id;
|
package/dist/core/dev/index.js
CHANGED
|
@@ -46,7 +46,7 @@ async function dev(config, options) {
|
|
|
46
46
|
https: !!((_a = viteConfig.server) == null ? void 0 : _a.https)
|
|
47
47
|
})
|
|
48
48
|
);
|
|
49
|
-
const currentVersion = "1.1.
|
|
49
|
+
const currentVersion = "1.1.3";
|
|
50
50
|
if (currentVersion.includes("-")) {
|
|
51
51
|
warn(options.logging, null, msg.prerelease({ currentVersion }));
|
|
52
52
|
}
|
package/dist/core/messages.js
CHANGED
|
@@ -46,7 +46,7 @@ function devStart({
|
|
|
46
46
|
https,
|
|
47
47
|
site
|
|
48
48
|
}) {
|
|
49
|
-
const version = "1.1.
|
|
49
|
+
const version = "1.1.3";
|
|
50
50
|
const rootPath = site ? site.pathname : "/";
|
|
51
51
|
const localPrefix = `${dim("\u2503")} Local `;
|
|
52
52
|
const networkPrefix = `${dim("\u2503")} Network `;
|
|
@@ -225,7 +225,7 @@ function printHelp({
|
|
|
225
225
|
message.push(
|
|
226
226
|
linebreak(),
|
|
227
227
|
` ${bgGreen(black(` ${commandName} `))} ${green(
|
|
228
|
-
`v${"1.1.
|
|
228
|
+
`v${"1.1.3"}`
|
|
229
229
|
)} ${headline}`
|
|
230
230
|
);
|
|
231
231
|
}
|
package/dist/core/util.js
CHANGED
|
@@ -5,7 +5,7 @@ import resolve from "resolve";
|
|
|
5
5
|
import slash from "slash";
|
|
6
6
|
import { fileURLToPath, pathToFileURL } from "url";
|
|
7
7
|
import { prependForwardSlash, removeTrailingForwardSlash } from "./path.js";
|
|
8
|
-
const ASTRO_VERSION = "1.1.
|
|
8
|
+
const ASTRO_VERSION = "1.1.3";
|
|
9
9
|
function isObject(value) {
|
|
10
10
|
return typeof value === "object" && value != null;
|
|
11
11
|
}
|