Comments (4)
The best workflow here really is to share ES6 code as-is.
We assemble all the modules together in development, using SystemJS to load Traceur dynamically for compilation.
Then we do one single build at the end.
The big shift here would be moving towards sharing uncompiled code. Which moves away from the messy situation of half-builds at the moment.
from jspm-cli.
I was wondering about this myself.
Surely there is some overhead to compiling to ES5 on each browser refresh while developing?
I've yet to build a large application with the "compile to ES5 on the fly" approach so I might be wrong here. I was going to try and benchmark that approach to see what the overhead would be.
The workflow you are suggesting is
- use a package manager to assemble your application packages, most of them being written in ES6.
- load them all in with SystemJS and use traceur to compile them to ES5 on the fly and develop like that?
from jspm-cli.
Performance testing for this workflow would be very interesting indeed.
There is no single workflow for ES6 yet. We're still working things out. You do have to consider the implications of whatever approach you take for a project.
For example, I can compile some ES6 statically only using features from https://github.com/square/esnext. Perhaps leave in the ES6 module syntax to maintain support for bindings and circular references. If performance worries you, compile the ES6 module syntax into anonymous System.register([], function(){}) at this point already. Perhaps even compile into AMD or CommonJS.
The fact is that we can consume all of the above. If ES6 modules are used, they get interpreted. If other ES6 syntax is present this is parsed by Traceur.
So there is a kind of static -> dynamic compilation gradient here, and you can really pick and choose where to do what. For example if you don't want Traceur runtime, perhaps compile all the runtime-based features using esnext static compilers (eg regenerator), then only do module syntax, arrow functions and block scoping in the dynamic compilation.
I hope that makes some sense... it really is an open book.
from jspm-cli.
This is kind of an ongoing thing, and I think we have to let the best strategies evolve. Closing for now.
from jspm-cli.
Related Issues (20)
- Relative path imports in react-dom (dev), react-intl, semantic-ui-react HOT 2
- Error "Trailing "/" installs not supported installing" when installing react-intl using esm.sh provider HOT 2
- Fix Windows Tests HOT 1
- Certificate issues on ga.jspm.io HOT 1
- Support succinct list of updatable deps, and excluding certain deps in an "update all"
- Development mode for esm.sh HOT 5
- How to achieve intellisense with libraries defined in import maps? HOT 4
- `tailwindcss` Has an `oxide` Error HOT 3
- Dev Watch Serve
- Build lock
- jspm build: Make rollup configuration optional HOT 4
- Windows CI HOT 1
- How to alias react to preact consistently? HOT 9
- No './300.css' exports subpath defined in https://ga.jspm.io/npm:@fontsource/[email protected]/ HOT 3
- `jspm install twind` fails HOT 1
- Feature Request: Respect package.json alias section when resolving dependencies
- ERROR Module not found ABC HOT 1
- esm.sh failing on lit imports HOT 2
- HTML linking case importmap input HOT 1
- Making es-module-shims optional
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jspm-cli.