ai / dual-publish

Publish JS project as dual ES modules and CommonJS package to npm
MIT License
187 stars 11 forks source link

Enhance exports field #12

Closed vankop closed 4 years ago

vankop commented 4 years ago

Would be great to support additional exports field conditions regarding to webpack guideline

<root>.style => <root>.exports.style <root>.sass => <root>.exports.sass <root>.types => <root>.exports.types <root>.exports.import => <root>.exports.module not sure that this is possible. This condition requires only esm subtree (esm->...->cjs disallowed).

ai commented 4 years ago

Sure. Can you send a PR?

alexander-akait commented 4 years ago

<root>.less => <root>.exports.less <root>.styl => <root>.exports.styl

vankop commented 4 years ago

<root>.less => <root>.exports.less <root>.styl => <root>.exports.styl

added in PR

ai commented 4 years ago

Released at 0.11