globalize-webpack-plugin
globalize-webpack-plugin copied to clipboard
try to migrate from CommonChunksPlugin to optimization.splitChunks
Mostly following https://gist.github.com/sokra/1522d586b8e5c0f5072d7565c2bee693
I didn't get far though. Current output:
> [email protected] test /Users/joern.zaefferer/dev/other/globalize-webpack-plugin
> mocha test
PatchedRawModule
updateHash
✓ should produce the same hash for modules with the same source
✓ should produce different hashes for modules with different source
Globalize Webpack Plugin
Production Mode
Custom tempdir
(node:17457) DeprecationWarning: Tapable.apply is deprecated. Call apply on the plugin directly instead
(node:17457) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
No Globalize compiled data module found
(node:17457) DeprecationWarning: Chunk.forEachModule: Use for(const module of chunk.modulesIterable) instead
(node:17457) DeprecationWarning: Chunk.mapModules: Use Array.from(chunk.modulesIterable, fn) instead
✓ should extract formatters and parsers from basic code
The compiled bundle
1) "before all" hook for "should extract formatters and parsers from basic code"
Default module ids
No Globalize compiled data module found
[...]
6 passing (518ms)
4 failing
1) Globalize Webpack Plugin Production Mode Custom tempdir The compiled bundle "before all" hook for "should extract formatters and parsers from basic code":
Error: ENOENT: no such file or directory, open '/Users/joern.zaefferer/dev/other/globalize-webpack-plugin/_test-output/tempdir/runtime.js'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Context.before (test/ProductionModePlugin.js:104:33)
[...]
Tried a few more configuration properties, but nothing helped. I don't even understand what that runtime.js
is supposed to do.
I have an unfinished webpack-4 globalize example here: https://github.com/rxaviers/globalize/commit/1515713aad95debe22817fe7001f453920be7bf1. It could be useful...