Skip to content

try to migrate from CommonChunksPlugin to optimization.splitChunks#87

Open
jzaefferer wants to merge 2 commits intorxaviers:masterfrom
jzaefferer:webpack-4-migration
Open

try to migrate from CommonChunksPlugin to optimization.splitChunks#87
jzaefferer wants to merge 2 commits intorxaviers:masterfrom
jzaefferer:webpack-4-migration

Conversation

@jzaefferer
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@rxaviers
Copy link
Copy Markdown
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants