-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snabbdom and ECMAScript Modules #516
Comments
Agreed. Proper standard style is great. Haven’t read all the issues though.
Will read them and form a detailed opinion.
|
@nojvek Yes, but I think current state-of-the-art (added to topic start) is more important than old issues 😄 |
And maybe we have to get rid of Browserify here... |
I would love to see snabbdom transition to es modules, but I would prefer we wait on that until it becomes a stable api in node. It's still marked as experimental: https://nodejs.org/dist/latest-v12.x/docs/api/esm.html#esm_ecmascript_modules |
Seems like a couple of hours of study to figure it out all: |
we could do a hybrid package. Honestly though, it might just be easier to: 1- wait until the feature is stable in node |
What I have been doing is using rollup for libraries. This means that I compile the code with typescript with es modules and then use rollup to build a commonjs bundle and also a es bundle of all the library code. See the package.json for an example. |
node v14 among other things removes the experimental warning on es modules. Some thoughts on this related to snabbdom:
@mightyiam @paldepind what are your thoughts on this? |
I've got a starter PR #592 which does the following things:
things I didn't do:
Hopefully this will be a good starting point for discussions. I've tried this in snabby, in a similar |
I closed the original PR and submitted a new, cleaner one (#596), based on feedback from kuraga and mightyiam. |
BREAKING CHANGE: CommonJS module are no longer provided. BREAKING CHANGE: import paths in ES modules include file name extensions. BREAKING CHANGE: Compiled to ES2015 (was ES5). Fixes #516. Fixes #437. Fixes #263. Kind of. Because there is no build step. Thanks to @mreinstein on starting this work.
Please review #601 |
BREAKING CHANGE: CommonJS module are no longer provided. BREAKING CHANGE: import paths in ES modules include file name extensions. BREAKING CHANGE: Compiled to ES2015 (was ES5). Fixes #516. Fixes #437. Fixes #263. Kind of. Because there is no build step. Thanks to @mreinstein on starting this work.
BREAKING CHANGE: CommonJS module are no longer provided. BREAKING CHANGE: import paths in ES modules include file name extensions. BREAKING CHANGE: Compiled to ES2015 (was ES5). Fixes #516. Fixes #437. Fixes #263. Kind of. Because there is no build step. Thanks to @mreinstein on starting this work.
BREAKING CHANGE: CommonJS module are no longer provided. BREAKING CHANGE: import paths in ES modules include file name extensions. BREAKING CHANGE: Compiled to ES2015 (was ES5). Fixes #516. Fixes #437. Fixes #263. Kind of. Because there is no build step. Thanks to @mreinstein on starting this work.
BREAKING CHANGE: CommonJS module are no longer provided. BREAKING CHANGE: import paths in ES modules include file name extensions. BREAKING CHANGE: Compiled to ES2015 (was ES5). Fixes #516. Fixes #437. Fixes #263. Kind of. Because there is no build step. Thanks to @mreinstein on starting this work.
Do we wish to provide Even though TypeScript does not yet provide an option of outputting any extension other than |
I believe IMO, this is a quirk/proposal/convention that is interesting but is another thing that can be dropped. |
Another thing we should consider is that node is not the only run time. deno is going 1.0 soon, in a few weeks, and this just uses pure es modules and typescript. It's pretty exciting stuff! https://deno.land/ |
BREAKING CHANGE: CommonJS module are no longer provided. BREAKING CHANGE: import paths in ES modules include file name extensions. BREAKING CHANGE: Compiled to ES2015 (was ES5). Fixes #516. Fixes #437. Fixes #263. Kind of. Because there is no build step. Thanks to @mreinstein on starting this work.
BREAKING CHANGE: CommonJS module are no longer provided. BREAKING CHANGE: import paths in ES modules include file name extensions. BREAKING CHANGE: Compiled to ES2015 (was ES5). Fixes #516. Fixes #437. Fixes #263. Kind of. Because there is no build step. Thanks to @mreinstein on starting this work.
BREAKING CHANGE: CommonJS module are no longer provided. BREAKING CHANGE: import paths in ES modules include file name extensions. BREAKING CHANGE: Compiled to ES2015 (was ES5). Fixes #516. Fixes #437. Fixes #263. Kind of. Because there is no build step. Thanks to @mreinstein on starting this work.
BREAKING CHANGE: CommonJS module are no longer provided. BREAKING CHANGE: import paths in ES modules include file name extensions. BREAKING CHANGE: Compiled to ES2015 (was ES5). Fixes #516. Fixes #437. Fixes #263. Kind of. Because there is no build step. Thanks to @mreinstein on starting this work.
BREAKING CHANGE: CommonJS module are no longer provided. BREAKING CHANGE: import paths in ES modules include file name extensions. BREAKING CHANGE: Compiled to ES2015 (was ES5). Fixes #516. Fixes #437. Fixes #263. Kind of. Because there is no build step. Thanks to @mreinstein on starting this work.
BREAKING CHANGE: CommonJS module are no longer provided. BREAKING CHANGE: import paths in ES modules include file name extensions. BREAKING CHANGE: Compiled to ES2015 (was ES5). Fixes #516. Fixes #437. Fixes #263. Kind of. Because there is no build step. Thanks to @mreinstein on starting this work.
BREAKING CHANGE: CommonJS module are no longer provided. BREAKING CHANGE: import paths in ES modules include file name extensions. BREAKING CHANGE: Compiled to ES2015 (was ES5). Fixes #516. Fixes #437. Fixes #263. Kind of. Because there is no build step. Thanks to @mreinstein on starting this work.
BREAKING CHANGE: CommonJS module are no longer provided. BREAKING CHANGE: import paths in ES modules include file name extensions. BREAKING CHANGE: Compiled to ES2015 (was ES5). Fixes #516. Fixes #437. Fixes #263. Kind of. Because there is no build step. Thanks to @mreinstein on starting this work.
BREAKING CHANGE: CommonJS module are no longer provided. BREAKING CHANGE: import paths in ES modules include file name extensions. BREAKING CHANGE: Compiled to ES2015 (was ES5). Fixes #516. Fixes #437. Fixes #263. Kind of. Because there is no build step. Thanks to @mreinstein on starting this work.
BREAKING CHANGE: CommonJS module are no longer provided. BREAKING CHANGE: import paths in ES modules include file name extensions. BREAKING CHANGE: Compiled to ES2015 (was ES5). Fixes #516. Fixes #437. Fixes #263. Kind of. Because there is no build step. Thanks to @mreinstein on starting this work.
BREAKING CHANGE: CommonJS module are no longer provided. BREAKING CHANGE: import paths in ES modules include file name extensions. BREAKING CHANGE: Compiled to ES2015 (was ES5). Fixes #516. Fixes #437. Fixes #263. Kind of. Because there is no build step. Thanks to @mreinstein on starting this work.
BREAKING CHANGE: CommonJS module are no longer provided. BREAKING CHANGE: import paths in ES modules include file name extensions. BREAKING CHANGE: Compiled to ES2015 (was ES5). Fixes #516. Fixes #437. Fixes #263. Kind of. Because there is no build step. Thanks to @mreinstein on starting this work.
BREAKING CHANGE: CommonJS module are no longer provided. BREAKING CHANGE: import paths in ES modules include file name extensions. BREAKING CHANGE: Compiled to ES2015 (was ES5). Fixes #516. Fixes #437. Fixes #263. Kind of. Because there is no build step. Thanks to @mreinstein on starting this work.
BREAKING CHANGE: CommonJS module are no longer provided. BREAKING CHANGE: import paths in ES modules include file name extensions. BREAKING CHANGE: Compiled to ES2015 (was ES5). Fixes #516. Fixes #437. Fixes #263. Kind of. Because there is no build step. Thanks to @mreinstein on starting this work.
These snabbdom files from a cdn are not usable in a browser as they are |
try skypack: import { h } from 'https://cdn.skypack.dev/snabbdom' |
I think it's time to discuss: Snabbdom and ECMAScript Modules.
My thoughts: Snabbdom should be standard-compliant as much as possible.
UPD: About current state of the art, see for instance 1, 2.
All issues about this ATM: #200, #225, #247, #261, #263, #312, #319, #338, #437.
New issues about this (updating): #516, #522, #523, #542, #543, cyclejs/cyclejs#925, #568, #723, #726, #760, #881, #913, #922, #963.
/cc @paldepind , @mightyiam , @nojvek
Issues solves this (updating): #601, #695, #696.
The text was updated successfully, but these errors were encountered: