Open snsttr opened 4 years ago
Can also confirm this on Windows 10. Fortunately, only my development environment is Windows, so I don't need to use rev, our staging/production as well as CI are all Linux, so the webpack production build task outputs the JS rev-manifest.json
paths correctly in these environments. Not sure if this has been happening for sometime, until I only noticed when testing the build task locally for some additional task work.
As a possible workaround you can use WSL which would use Linux binaries.
On my windows system all js-ressources in the rev-manifest.json have backslashes in their file pathes. This makes it impossible for the craft 3 plugin "craft-asset-rev" to find the correct assertion, since it expects the path with slashes.
Example: blendid generates
"javascripts\\app.js": "javascripts\\app-040d86f5c824dfce4156.js",
craft-asset-rev would work with"javascripts/app.js": "javascripts/app-040d86f5c824dfce4156.js",
Possible solution: The file path is being generated in
gulpfile.js/lib/webpackManifest.js
by usingpath.join(...)
which generates backslashes for file pathes on windows systems (for original filename and filename with hash). You could just replace backslashes with slashes here.