Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/core/src/plugins/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const pluginBasic = (): RsbuildPlugin => ({

setup(api) {
api.modifyBundlerChain(
(chain, { env, isDev, target, bundler, environment, CHAIN_ID }) => {
(chain, { isDev, target, bundler, environment, CHAIN_ID }) => {
const { config } = environment;

chain.name(environment.name);
Expand Down Expand Up @@ -82,7 +82,7 @@ export const pluginBasic = (): RsbuildPlugin => ({
.use(bundler.HotModuleReplacementPlugin);
}

if (env === 'development') {
if (isDev) {
// Set correct path for source map
// this helps VS Code break points working correctly in monorepo
chain.output.devtoolModuleFilenameTemplate(
Expand Down
1 change: 1 addition & 0 deletions packages/core/tests/__snapshots__/default.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1349,6 +1349,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when targe
"output": {
"assetModuleFilename": "static/assets/[name].[contenthash:8][ext]",
"chunkFilename": "[name].js",
"devtoolModuleFilenameTemplate": [Function],
"filename": "[name].js",
"hashFunction": "xxhash64",
"library": {
Expand Down
Loading