rauschma / re-template-tag

Home Page:http://2ality.com/2017/07/re-template-tag.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

compatibility with .mjs specification

lorenzofox3 opened this issue · comments

The package can not be imported from a .mjs file:
the "main" entry point refers to a cjs with other export than a default.

  1. main should not specify an extension.
  2. this "main" should have both version: a .mjs version with the ES6 module and a .js with the CJS version.

You can have a look this issue for more details

Thanks !

I’ll update this code once there is an actual standard. At the moment, everything is in flux.

I understand your point.
However there is no code to change, only the build script (I can do it if it 's too much of a trouble) and the package.json.
Moreover that would be a quick win for various build tools whereas there should not be any drawback/non backward changes.

Otherwise what would you suggest me to do to workaround the faced issue ?

  • I could include your package in the bundle when I build my library. The downside is that I would have to rebuild and republish a version whenever you publish a new version (which somehow breaks the concept of dependency :) )
  • Anyway, your library is small enough and does not change a lot. I could simply copy/paste the code (with the same problems than above though)
  • drop the support of .mjs extension