Skip to content

Commit

Permalink
fix: only target web
Browse files Browse the repository at this point in the history
  • Loading branch information
9aoy committed May 14, 2024
1 parent d8bdde6 commit 6a3b1eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/plugin-typed-css-modules/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export const pluginTypedCSSModules = (): RsbuildPlugin => ({
setup(api) {
api.modifyBundlerChain({
order: 'post',
handler: async (chain, { isServer, isWebWorker, CHAIN_ID }) => {
if (!isServer && !isWebWorker) {
handler: async (chain, { target, CHAIN_ID }) => {
if (target === 'web') {
const ruleIds = [
CHAIN_ID.RULE.CSS,
CHAIN_ID.RULE.SASS,
Expand Down

0 comments on commit 6a3b1eb

Please sign in to comment.