cozy / cozy-client-js

Javascript library to write Cozy applications
https://docs.cozy.io/en/cozy-client-js/README/
MIT License
11 stars 12 forks source link

wip Transpile instead of bundling #285

Closed ptbrowne closed 3 years ago

ptbrowne commented 5 years ago
nono commented 5 years ago

I don't know if it is still used, but the cozy-stack serves a bundled version of cozy-client-js: https://github.com/cozy/cozy-stack/blob/master/assets/.externals#L13-L19

ptbrowne commented 5 years ago

OK. Here I am mainly targetting node JS, it should help with konnector size.

I think in the future the cozy-client-js in the stack will not be used.

nono commented 5 years ago

Do we even need transpilation? I don't think we are using anything new that is not supported by Node 8 in this repository (but maybe we have an older version of nodejs for konnectors, I don't remember).

ptbrowne commented 5 years ago

Good question. We need transpilation since es6 modules (import/export) are not yet fully supported in node.js. It is behind the flag --experimental-modules and the extension of your files must be .mjs.

nono commented 5 years ago

For konnectors, we are doing a bundle to have a single .js file to execute. So, I don't think it would be an issue for konnectors (but we need to transform imports for cozy-desktop).

ptbrowne commented 5 years ago

ACH is using cozy-client-js without bundling. So it would be an issue if imports were used.

ptbrowne commented 3 years ago

Closing as cozy-client-js is no longer used except by Desktop.