Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try to migrate from CommonChunksPlugin to optimization.splitChunks #87

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

try to migrate from CommonChunksPlugin to optimization.splitChunks #87

wants to merge 2 commits into from

Conversation

jzaefferer
Copy link
Contributor

Mostly following https://gist.github.com/sokra/1522d586b8e5c0f5072d7565c2bee693

I didn't get far though. Current output:

> globalize-webpack-plugin@2.1.0 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)

[...]
@jzaefferer jzaefferer mentioned this pull request May 15, 2018
@jzaefferer
Copy link
Contributor Author

Tried a few more configuration properties, but nothing helped. I don't even understand what that runtime.js is supposed to do.

}
}
}
},
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rxaviers
Copy link
Owner

I have an unfinished webpack-4 globalize example here: rxaviers/globalize@1515713. It could be useful...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants