Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow ES6 modular code via Babel and Webpack #375
the tooling now includes yarn itself (which can be relied on, since netlify has yarn).
The structure of the JS files now is (in my opinion) more reasonable to think about, and also will allow for faster development for further features.
jQuery, bootstrap are still loaded via cdn, because that's better for large bundles like those.
instantsearch, docsearch, moment are loaded via npm and bundled in (which saved approx. 300kb on the search page)
(I worked a bit with @Haroenv on this)
Using only babel may work I guess even if we want to use React, we would have to inject React via script tags then (because Babel won't be able to inline what's inside node_modules right?).
It would also mean that we would not be able for now to use any dependency from npm, this may be a bit tricky at some point to have to rely only on script tags. As you want!
This looks pretty good to me. Tested a few pages on the Netlify preview (https://deploy-preview-375--yarnpkg.netlify.com/) and it all seems to be working.
The only thing I don't like is that there's two separate "build" commands: The build command in the make file (