Make module types explicit and convert some to ESM (#15964)

This commit is contained in:
Steve Repsher
2023-03-30 05:23:43 -04:00
committed by GitHub
parent fcc95825e3
commit 1f1898fa46
53 changed files with 188 additions and 188 deletions

View File

@@ -103,7 +103,7 @@ module.exports = function (opts = {}) {
}
delete optionsObject.type;
if (!new RegExp("^.*/").test(workerFile)) {
if (!/^.*\//.test(workerFile)) {
this.warn(
`Paths passed to the Worker constructor must be relative or absolute, i.e. start with /, ./ or ../ (just like dynamic import!). Ignoring "${workerFile}".`
);