Open mhuggins opened 6 years ago
I'm trying to change a resolver for a test. Specifically, I have a file being required via "worker-loader?inline=true!pdfjs-dist/build/pdf\.worker", and I would like my test suite to treat it as "raw-loader!pdfjs-dist/build/pdf\.worker".
I tried to abuse the current setup like so:
resolve: { alias: { "worker-loader\\?inline=true!pdfjs-dist/build/pdf\\.worker": path.resolve(__dirname, "node_modules/pdfjs-dist/build/pdf.worker.js") } }
Unfortunately, that simply prefixes the import with "./", changing it into "./worker-loader?inline=true!pdfjs-dist/build/pdf\.worker".
Also a minor thing, but if a filename has a "." in it, your regexp match will treat that as any character instead of a period.
I'm trying to change a resolver for a test. Specifically, I have a file being required via "worker-loader?inline=true!pdfjs-dist/build/pdf\.worker", and I would like my test suite to treat it as "raw-loader!pdfjs-dist/build/pdf\.worker".
I tried to abuse the current setup like so:
Unfortunately, that simply prefixes the import with "./", changing it into "./worker-loader?inline=true!pdfjs-dist/build/pdf\.worker".