Browserify doesn't work in my environment

The initial instructions says to use browserify. I may have things installed incorrectly but I could never get it to work: C:\Users\xxx\node\node_modules\prosemirror>browserify --outfile …/…/public/demo-built.js demo/demo.js

C:\Users\xxx\node\node_modules\prosemirror\demo\demo.js:1 import {ProseMirror} from “…/src/edit/main” ^ ParseError: ‘import’ and ‘export’ may appear only with ‘sourceType: module’

However ‘npm run demo’ works and is better for development because of watchify.

You have to install and enable the babelify module to directly load the source files. Or first do npm run dist (after installing the dev dependencies) in your prosemirror checkout, and then import from the dist/ rather than the src/ directory.

Ahh, I didn’t import from the dist directory. Thanks.