GrapesJS / preset-webpage

GrapesJS Plugin Webpage Preset
http://grapesjs.com/demo.html
BSD 3-Clause "New" or "Revised" License
335 stars 291 forks source link

Cannot import grapesjs #88

Open eschiebel opened 5 months ago

eschiebel commented 5 months ago

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.