Skip to content

Commit 61e7f24

Browse files
authored
fix(fullstack): enable emitAssets by default (#1186)
1 parent e910e36 commit 61e7f24

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

packages/fullstack/e2e/basic.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,17 @@ function defineTest(f: Fixture) {
4646
).toBeVisible();
4747

4848
// css
49+
// - App.css
4950
await expect(page.locator(".read-the-docs")).toHaveCSS(
5051
"color",
5152
"rgb(136, 136, 136)",
5253
);
54+
// - index.css
55+
await expect(page.locator("button")).toHaveCSS(
56+
"background-color",
57+
"rgb(249, 249, 249)",
58+
);
59+
5360
expect(errors).toEqual([]);
5461
});
5562

packages/fullstack/examples/basic/src/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ button:focus-visible {
6464
color: #747bff;
6565
}
6666
button {
67-
background-color: #f9f9f9;
67+
background-color: rgb(249, 249, 249);
6868
}
6969
}

packages/fullstack/src/plugin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ export function assetsPlugin(pluginOpts?: FullstackPluginOptions): Plugin[] {
109109
resolvedConfig = config;
110110
},
111111
configEnvironment(name) {
112-
if (pluginOpts?.serverEnvironments?.includes(name)) {
112+
const serverEnvironments = pluginOpts?.serverEnvironments ?? ["ssr"];
113+
if (serverEnvironments.includes(name)) {
113114
return {
114115
build: {
115116
emitAssets: true,

0 commit comments

Comments
 (0)