Skip to content

Commit 0e52fd2

Browse files
committed
fix(rspack): avoid require
1 parent db3c5ca commit 0e52fd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rspack.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ const appConfig: Configuration = {
469469
// `yarn why` says this is only needed in dev deps
470470
string_decoder: false,
471471
// For framer motion v6, might be able to remove on v11
472-
'process/browser': require.resolve('process/browser'),
472+
'process/browser': import.meta.resolve('process/browser'),
473473
},
474474

475475
// Prefers local modules over node_modules
@@ -805,7 +805,7 @@ if (IS_PRODUCTION) {
805805
}
806806

807807
if (CODECOV_TOKEN && ENABLE_CODECOV_BA) {
808-
const {codecovWebpackPlugin} = require('@codecov/webpack-plugin');
808+
const {codecovWebpackPlugin} = await import('@codecov/webpack-plugin');
809809
// defaulting to an empty string which in turn will fallback to env var or
810810
// determine merge commit sha from git
811811
const GH_COMMIT_SHA = env.GH_COMMIT_SHA ?? '';

0 commit comments

Comments
 (0)