Skip to content

Commit

Permalink
fix: undetermistic module type for virtual module (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahabhgk authored Sep 4, 2024
1 parent 1760120 commit 2cfe5c7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/rspack/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export function getRspackPlugin<UserOptions = Record<string, never>>(
unpluginName: plugin.name,
},
}],
type: 'javascript/auto',
})
}

Expand Down
1 change: 1 addition & 0 deletions src/webpack/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ export function getWebpackPlugin<UserOptions = Record<string, never>>(
unpluginName: plugin.name,
},
}],
type: 'javascript/auto',
})
}

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/virtual-module/unplugin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { createUnplugin } = require('unplugin')
const { createUnplugin } = require('../../../')

module.exports = createUnplugin(() => {
return {
Expand Down

0 comments on commit 2cfe5c7

Please sign in to comment.