Skip to content

Commit 94d5f06

Browse files
himself65askoufis
andauthored
vite: Create compiler during buildStart instead of configResolved (#1353)
Co-authored-by: Adam Skoufis <[email protected]>
1 parent cff97a7 commit 94d5f06

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@vanilla-extract/vite-plugin": patch
3+
---
4+
5+
Move `vite-node` compiler creation to a more appropriate plugin hook to ensure correct cleanup of resources

packages/vite-plugin/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ export function vanillaExtractPlugin({
113113
async configResolved(_resolvedConfig) {
114114
config = _resolvedConfig;
115115
packageName = getPackageInfo(config.root).name;
116-
116+
},
117+
async buildStart() {
117118
if (mode !== 'transform') {
118119
const { loadConfigFromFile } = await vitePromise;
119120
const configFile = await loadConfigFromFile(

0 commit comments

Comments
 (0)