ParseError: 'import' and 'export' may appear only with 'sourceType: module'
What to do to fix?
- npm install prosemirror –save (probably already done this, which is how you ended up in this mess in the first place)
- npm install –save-dev browserify
- npm install –save-dev babelify
- npm install –save-dev babel-preset-es2015
- Create .babelrc file
- browserify your-js-file.js -t babelify -o output.js
I’m sure ‘future-Joseph’ will thank me for my efforts documenting this, although by then ES6 will probably be ‘old hat’.