Skip to content

Commit 62cc20b

Browse files
chore: apply automated updates
1 parent 4e5bbdb commit 62cc20b

2 files changed

Lines changed: 16 additions & 12 deletions

File tree

src/build/vite/plugin.ts

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { defu } from "defu";
1818
import { prettyPath } from "../../utils/fs";
1919
import { NitroDevApp } from "../../dev/app";
2020
import { nitroPreviewPlugin } from "./preview";
21-
import { assetsPlugin } from "@hiogawa/vite-plugin-fullstack"
21+
import { assetsPlugin } from "@hiogawa/vite-plugin-fullstack";
2222

2323
// https://vite.dev/guide/api-environment-plugins
2424
// https://vite.dev/guide/api-environment-frameworks.html
@@ -297,16 +297,20 @@ function nitroPlugin(ctx: NitroPluginContext): VitePlugin[] {
297297
},
298298
},
299299
},
300-
...ctx.pluginConfig.experimental?.assetsImport ? [
301-
assetsPlugin(),
302-
{
303-
name: "nitro:patch-assets-plugin",
304-
configResolved(config) {
305-
const plugin = config.plugins.find(p => p.name === 'fullstack:assets');
306-
ctx._buildApp = (plugin?.buildApp as any).handler
307-
},
308-
} satisfies VitePlugin,
309-
] : [],
300+
...(ctx.pluginConfig.experimental?.assetsImport
301+
? [
302+
assetsPlugin(),
303+
{
304+
name: "nitro:patch-assets-plugin",
305+
configResolved(config) {
306+
const plugin = config.plugins.find(
307+
(p) => p.name === "fullstack:assets"
308+
);
309+
ctx._buildApp = (plugin?.buildApp as any).handler;
310+
},
311+
} satisfies VitePlugin,
312+
]
313+
: []),
310314
];
311315
}
312316

src/build/vite/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export interface NitroPluginConfig {
3737
/**
3838
* @experimental Enable `?assets` import proposed by https://github.com/vitejs/vite/discussions/20913
3939
*/
40-
assetsImport?: boolean
40+
assetsImport?: boolean;
4141
};
4242
}
4343

0 commit comments

Comments
 (0)