preact-portal icon indicating copy to clipboard operation
preact-portal copied to clipboard

Add ES Module export

Open drwpow opened this issue 6 years ago • 0 comments

Trying to use preact-head-tag in an ESM project using @pika/web (no webpack). preact-head-tag depends on preact-portal, and it’s not possible to use because there’s no ES Module export.

This PR keeps the existing outputs as-is, but adds an additional ESM export to the bundle while still being fully backwards-compatible.

To achieve this, I had to update Rollup & Babel to their latest versions. Though the Babel config was changed, I’m pretty confident the existing outputs dist/preact-portal.js and dist/preact-portal.min.js are unaffected; skimming them over they appear the exact same and have the exact same filesize as they did before.

drwpow avatar Sep 14 '19 23:09 drwpow