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

Add Autodll plugin and DllReferencePlugin capability #131

Closed
wants to merge 1 commit into from

Conversation

moos
Copy link

@moos moos commented Feb 5, 2018

This enables DLL generation using the new autodll-webpack-plugin - implementation is similar to this PR facebook#2710.

I've also added a way to consume DLLs (from autodll or from other repos).

@@ -1,4 +1,5 @@
{
"name": "custom-react-scripts",
Copy link
Author

Choose a reason for hiding this comment

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

This was needed for linklocal to work.

@@ -5,7 +5,9 @@ module.exports = function mapObject(obj, fn, toArray) {
return final;
}
if (toArray) {
final.push(result);
Array.isArray(result)
Copy link
Author

Choose a reason for hiding this comment

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

dll reference returns an array - need to merge rather than push.

@@ -288,6 +288,7 @@ module.exports = {
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
// You can remove this if you don't use Moment.js:
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
...customConfig.webpackPlugins,
Copy link
Author

Choose a reason for hiding this comment

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

dlls are obviously needed for prod builds - so include here. Individual features can disable themselves via the isDev parameter.

@kitze kitze closed this Jun 1, 2018
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