This repository has been archived by the owner on Dec 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
feat: compile all node_modules #99
Open
satazor
wants to merge
1
commit into
master
Choose a base branch
from
babel-node-modules
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The future is to run babel through every code, including node_modules. You may read more here: parcel-bundler/parcel#559 (comment) The `babel-loader` has a very good cache for sometime now, making compiling everything really fast. `create-react-app` will be doing the same in their next major version.
satazor
commented
May 5, 2018
@@ -76,8 +75,6 @@ module.exports = ({ minify } = {}) => { | |||
plugins: [ | |||
// Necessary for import() to work | |||
require.resolve('babel-plugin-dynamic-import-node'), | |||
// <3 hot module reload | |||
isDev ? require.resolve('react-hot-loader/babel') : null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
react-hot-loader
is not necessary on the server 😓
This was referenced May 5, 2018
HMR is seconds right? |
Yes, I will fix it. |
After merging this, we should work on our babel config to reduce the scope of it to just transpile non-standard JS stuff, like jsx. |
Actually, let's wait for babel 7 to come to merge this as well as the necessary babel changes to our modules! |
Reminder: add |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The future is to run babel through every code, including node_modules:
You may read more here: parcel-bundler/parcel#559 (comment)
The
babel-loader
has a very good cache for sometime now, making compiling everything really fast.create-react-app
will be compiling everything in their next major version too.Here are some benchmarks:
Compile just
src/
:Compile everything:
Compile everything +
thread-loader
:Based on these results, I've chosen to go without
thread-loader
because HMR becomes much slower.