You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using mochapack in a project of mine and recently upgraded to webpack 5. The migration was succesful thanks to the newly released version. Thanks for the great work!
There's one minor issue though that I encountered during the migration. Webpack 5 gives the following warning when running the tests:
Warning in ./node_modules/mochapack/lib/entry.js
Invalid dependencies have been reported by plugins or loaders for this module. All reported dependencies need to be absolute paths.
Invalid dependencies may lead to broken watching and caching.
As best effort we try to convert all invalid values to absolute paths and converting globs into context dependencies, but this is deprecated behavior.
Loaders: Pass absolute paths to this.addDependency (existing files), this.addMissingDependency (not existing files), and this.addContextDependency (directories).
Plugins: Pass absolute paths to fileDependencies (existing files), missingDependencies (not existing files), and contextDependencies (directories).
Globs: They are not supported. Pass absolute path to the directory as context dependencies.
The following invalid values have been reported:
* "C:/Users/my/test/file.js"
The reason is that webpack fails to recognize that C:/Users/my/test/file.js is an absolute path, as it expects it to be C:\Users\my\test\file.js.
I've been able to fix it by modifying entryLoader.ts by doing
I am using mochapack in a project of mine and recently upgraded to webpack 5. The migration was succesful thanks to the newly released version. Thanks for the great work!
There's one minor issue though that I encountered during the migration. Webpack 5 gives the following warning when running the tests:
The reason is that webpack fails to recognize that
C:/Users/my/test/file.js
is an absolute path, as it expects it to beC:\Users\my\test\file.js
.I've been able to fix it by modifying
entryLoader.ts
by doingSee also https://github.com/sysgears/mochapack/blob/master/src/webpack/loader/entryLoader.ts#L35.
Alternatively I think it should also be possible to just use
path.normalize()
instead of thenormalize-path
module:To Reproduce
Run mochapack on Windows with Webpack 5.
Environment:
The text was updated successfully, but these errors were encountered: