Skip to content

Commit

Permalink
reword comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mrm007 committed Jan 29, 2024
1 parent 6d19f71 commit 24e7ac1
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions packages/vite-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,18 @@ export function vanillaExtractPlugin({
root: config.root,
identifiers: getIdentOption(),
cssImportSpecifier: fileIdToVirtualId,
vitePlugins: userConfig.plugins
?.flat()
// Prevent an infinite loop where the compiler creates a new instance of the plugin, which creates a new compiler etc.
.filter(
(plugin) =>
typeof plugin === 'object' &&
plugin !== null &&
'name' in plugin &&
plugin.name !== 'vanilla-extract' &&
// skip Vitest plugins
plugin.name !== 'vitest' &&
!plugin.name.startsWith('vitest:'),
),
vitePlugins: userConfig.plugins?.flat().filter(
(plugin) =>
typeof plugin === 'object' &&
plugin !== null &&
'name' in plugin &&
// Prevent an infinite loop where the compiler creates a new instance of the plugin,
// which creates a new compiler, which creates a new instance of the plugin, etc.
plugin.name !== 'vanilla-extract' &&
// Skip Vitest plugins
plugin.name !== 'vitest' &&
!plugin.name.startsWith('vitest:'),
),
});
}
},
Expand Down

0 comments on commit 24e7ac1

Please sign in to comment.