2 ms·
I've been moving towards having my ES6-style code under `./src`, and having the transpile (and module configured) to `./dist` ... when I want to access the es6
by tracker1 12y ago
I've been moving towards having my ES6-style code under `./src`, and having the transpile (and module configured) to `./dist` ... when I want to access the es6 version (say from babel-node, I can simply require `mymodule/src`, which is more direct.
Also, if you are creating more discrete modules, the transpile time for a given module isn't bad at all. From a given project, I'm just bringing in `mymodule` and don't have to think about it beyond that... using jsparta, I can test against the es6 version for coverage, etc... and with mappings, the merged/minified JS the client sees can still reference the real starting point.
for the most part it's much friendlier when you embrace npm/node workflows with browserify (or webpack). With this in place, you always write/work against your es6-style. I use commonjs module syntax instead of imports, but may change my approach in the future.
- Touche 12y ago> I use commonjs module syntax instead of imports, but may change my approach in the future. You use commonjs with es6? Why?