swc-loader icon indicating copy to clipboard operation
swc-loader copied to clipboard

__webpack_require__(...).context is not a function

Open callmeteus opened this issue 3 years ago • 1 comments

I'm trying to port from babel-loader and ts-loader to swc-loader, but everytime require.context is called, it returns undefined.

When printing the require variable, it returns the following module:

function webpackEmptyContext(req) {
	var e = new Error("Cannot find module '" + req + "'");
	e.code = 'MODULE_NOT_FOUND';
	throw e;
}
webpackEmptyContext.keys = () => ([]);
webpackEmptyContext.resolve = webpackEmptyContext;
webpackEmptyContext.id = 5102;
module.exports = webpackEmptyContext;

callmeteus avatar Aug 10 '22 22:08 callmeteus

@theprometeus sorry for delay, the problems still exists? Can you create reproducible test repo?

alexander-akait avatar Oct 18 '22 21:10 alexander-akait