grapesjs-preset-webpage icon indicating copy to clipboard operation
grapesjs-preset-webpage copied to clipboard

Cannot import grapesjs

Open eschiebel opened this issue 9 months ago • 0 comments

The readme says

import grapesjs from 'grapesjs';
import plugin from 'grapesjs-preset-webpage';

const editor = grapesjs.init({
  container : '#gjs',
  // ...
  plugins: [plugin],
  pluginsOpts: {
    [plugin]: { /* options */ }
  }
  // or
  plugins: [
    editor => plugin(editor, { /* options */ }),
  ],
});

but import grapesjs from 'grapesjs' does not import anything. I can work around this by using const grapesjs = require('grapesjs'), but that's not ideal in a es6 environment.

Maybe this issue belongs in the grapesjs repo.

eschiebel avatar May 02 '24 20:05 eschiebel