editor.js icon indicating copy to clipboard operation
editor.js copied to clipboard

v2.27.0 is failing to bundle as an ESM in jsdelivr

Open dobbs opened this issue 2 years ago • 3 comments

A few days ago my use of editor.js stopped working. I think it is related to the 2.27.0 release. I rely on the jsdelivr CDN as the source for editor.js. That CDN is correctly building v2.26.5 but is failing with v2.27.0. Also, the onset of my symptoms coincide with the release date for v2.27.0.

Steps to reproduce: Visit https://cdn.jsdelivr.net/npm/@editorjs/[email protected]/+esm Notice the message "Failed to bundle using Rollup v2.79.1."

Expected behavior: jsdelivr is able to build v2.26.5 Visit https://cdn.jsdelivr.net/npm/@editorjs/[email protected]/+esm

Screenshots:

/**
 * Failed to bundle using Rollup v2.79.1.
 * If you believe this to be an issue with jsDelivr, and not with the package itself, please open an issue at https://github.com/jsdelivr/jsdelivr
 */

 throw new Error('Failed to bundle using Rollup v2.79.1. If you believe this to be an issue with jsDelivr, and not with the package itself, please open an issue at https://github.com/jsdelivr/jsdelivr');

Device, Browser, OS: MacBook Pro 2020, Firefox 112.0.2, MacOS 13.3.1 (22E261)

Editor.js version: 2.27.0

Plugins you use with their versions: Here's how I import the two plugins I use, but my code doesn't get to these lines because it fails when importing editor.js

    import SimpleImage from "https://cdn.jsdelivr.net/npm/@editorjs/simple-image/+esm"
    import LinkTool from "https://cdn.jsdelivr.net/npm/@editorjs/link/+esm"

dobbs avatar May 18 '23 14:05 dobbs

Seems the last version that was built correct was https://cdn.jsdelivr.net/npm/@editorjs/[email protected]/+esm

And it began failing Rollup and Terser passes in the 2.27.0-rc.5 and later: https://cdn.jsdelivr.net/npm/@editorjs/[email protected]/+esm

Not versed enough in the code-base to figure out where things broke.

fyrye avatar Jan 31 '24 03:01 fyrye

Hi, I am wondering if anyone is doing import editorjs successfully from a CDN? I still get the same error as mentioned above. Are there any updates on this?

fakob avatar Apr 21 '24 11:04 fakob

I get the same error using Symfony AssetsMapper (which outputs an error citing Rollup).

2.26.5 works fine.

A bit sad as we're at 2.29 now.

Individual tools import fine.

conradfr avatar May 15 '24 14:05 conradfr