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

Fix common packaging #765

Merged
merged 3 commits into from Feb 16, 2017
Merged

Fix common packaging #765

merged 3 commits into from Feb 16, 2017

Conversation

noirbizarre
Copy link
Contributor

This PR start to fix common.js packaging and side-effects and ensure:

  • optimization plugins are loaded once with a non breaking configuration (mangle.keep_fnames = true)
  • locales are not bundled into the common chunk
  • vue-strap components are cherry picked instead of all being included into the common chunk

To reduce the size of the common chunk, we will have to:

  • fix mangling (probably fixed with Vue.js 2.0 :/)
  • ends the jQuery/Bootstrap(.js) drop

@@ -12,7 +12,10 @@ export const lang = config.lang;
const resources = {};

resources[lang] = {};
resources[lang][NAMESPACE] = require('locales/' + NAMESPACE + '.' + lang + '.json');
// Force split and async loading of locale (and so remove them from common.js)
Copy link
Member

Choose a reason for hiding this comment

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

👍

}
}));
config.plugins.push(
new webpack.DefinePlugin({
Copy link
Member

Choose a reason for hiding this comment

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

Why is that plugin required now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Setting this environment variable drop some Vue.js code (warnings and some debug helpers) in production.

@noirbizarre noirbizarre merged commit ff37609 into opendatateam:master Feb 16, 2017
@noirbizarre noirbizarre deleted the fix-common-packaging branch February 17, 2017 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants