We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a468a0 commit d380894Copy full SHA for d380894
1 file changed
rspack.config.js
@@ -85,6 +85,13 @@ module.exports = {
85
}
86
],
87
plugins: [
88
+ // Convert ESM import.meta.dirname/filename to CommonJS equivalents.
89
+ // Required because @httptoolkit/browser-launcher is ESM and uses import.meta.dirname,
90
+ // but we output CommonJS where import.meta isn't available.
91
+ new rspack.DefinePlugin({
92
+ 'import.meta.dirname': '__dirname',
93
+ 'import.meta.filename': '__filename'
94
+ }),
95
// Optimistic require for 'iconv' in 'encoding', falls back to 'iconv-lite'
96
new rspack.NormalModuleReplacementPlugin(/\/iconv-loader$/, 'node-noop'),
97
// Optimistically required in (various) ws versions, with fallback
0 commit comments