If you use a build tool that includes type checking along with bundling (e.g. webpack + ts-loader without transpileOnly, create-react-app), do you do so only on build or also during development? Why not just run tsc/flow as a separate build step in CI, and in your IDE for dev?
-
Show this thread
-
Replying to @devongovett
The bundler is typically the second thing, after their editor, that gives a developer insight to the validity of their code. For that reason it makes a lot of sense to consider the bundler as your development environment. For production it doesn't really make any sense.
1 reply 0 retweets 2 likes -
Replying to @sebmck
i.e see errors in both editor AND terminal/browser console? But maybe not block the build so you can hack and fix errors later? Seems duplicative to me... I would have thought people wanted it the other way: block build in production for linter/type errors.
2 replies 0 retweets 0 likes -
Replying to @devongovett
People who want it to block production builds will just run their lint command before. Not everyone has their editor configured correctly for a project, errors may not necessarily be shown, it's an additional way before their changes hit CI and they release they needed to run X.
3 replies 0 retweets 5 likes -
Replying to @sebmck @devongovett
Also worth mentioning that editors will usually only show errors in the files you have open—relying on your editor for dev errors would punt some horrible problems down the road, to when you're finally ready to publish.
2 replies 0 retweets 1 like -
Replying to @AdamRackis @sebmck
What about tests? Should a bundler run them for you too? Tests are another form of code checking... Where do you draw the line?
1 reply 0 retweets 0 likes
Current test runners have way too much overhead and running every test is really heavy. Otherwise I would say yes. Would be nice to use code coverage and static analysis of changed code to determine what tests need to be reran, but that logic sounds overkill for only a bundler.
-
-
Replying to @sebmck @AdamRackis
Right, we’re really starting to hit the boundaries of these terms. At this point, I’m not sure I would call Parcel a bundler. That’s only one of its tasks.
0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 