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

[Babel] Improve the production build #154

Merged
merged 1 commit into from Jan 29, 2016
Merged

[Babel] Improve the production build #154

merged 1 commit into from Jan 29, 2016

Conversation

oliviertassinari
Copy link
Contributor

Fix #153.
And add some plugins for improving the production build.

Name Build size impact Description
transform-runtime -80 kB Remove duplicated babel helper functions.
transform-react-constant-elements 0 kB Save some memory allocation.
transform-react-inline-elements +10 kB Improve runtime performances.
transform-react-remove-prop-types (Promoted) -10 kB Remove propTypes.

@knowbody
Copy link
Contributor

lgtm! 🚀

kenwheeler added a commit that referenced this pull request Jan 29, 2016
[babel] Improve the production build
@kenwheeler kenwheeler merged commit 16933eb into FormidableLabs:master Jan 29, 2016
@kenwheeler
Copy link
Contributor

Thanks so much!

@@ -10,7 +10,7 @@
"build:dist": "NODE_ENV=production webpack --config webpack.config.production.js",
"lint": "eslint --ext .js,.jsx src",
"deploy": "npm run build:dist && surge -p .",
"start": "node server.js"
"start": "NODE_ENV=development node server.js"
Copy link
Member

Choose a reason for hiding this comment

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

Side Note -- this will break windows compatibility. The build:dist is probably OK for breaking, but might be nice to have this still work. Can we just leave no NODE_ENV and have that be defaulted to be development?

(or, use builder envs ;) )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oups, I have forgotten to remove this line from my commit. Fell free to fix it, sorry.

Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome catch @ryan-roemer , fixed here a32123c

Does it make sense to build a Spectacle builder archetype for core too? Or just for the boilerplate?

Copy link
Member

Choose a reason for hiding this comment

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

@kenwheeler -- I think just add builder alone to get the extra's like builder envs and builder concurrent and not worry about an archetype since spectacle itself is kind of a "one-off".

The spectacle-boilerplate could definitely be replaced by an archetype like builder-spectacle now that builder-init has landed.

That's my gut intuition, but it may be the case we could add init/ templates and init.js to spectacle itself and just have it all together.

@oliviertassinari oliviertassinari changed the title [babel] Improve the production build [Babel] Improve the production build Apr 3, 2016
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.

None yet

4 participants