hi! After upgrading my npm bpmn-js module from version 0.31 to 1.0.2 my grunt browserify task quarrels like this:
Running "browserify:app" (browserify) task
/home/fedd/Documents/Work/NetBeansProjects/rex/node_modules/bpmn-js/lib/Viewer.js:7
import {
^
ParseError: ‘import’ and ‘export’ may appear only with ‘sourceType: module’
Warning: Error running grunt-browserify. Use --force to continue.
Aborted due to warnings.
and another time like this,
Running "browserify:app" (browserify) task
SyntaxError: ‘import’ and ‘export’ may only appear at the top level (2:0) while parsing /home/fedd/Documents/Work/NetBeansProjects/rex/node_modules/bpmn-js/lib/Modeler.js while parsing file: /home/fedd/Documents/Work/NetBeansProjects/rex/node_modules/bpmn-js/lib/Modeler.js
Warning: Error running grunt-browserify.a Use --force to continue.
Aborted due to warnings.
Sorry if this is a known thing, I am downgrading for now, but probably it is really a problem
You must now configure a module transpiler such as Babel or Webpack to handle ES module imports and exports
if I only knew how to do this. I have just managed to create a gruntfile without any knowledge/exerience =(
I have based it on the example here, and it wasn’t updated. Can I ask for a hint - will I manage to configure a module transpiler with browserify and how?
the future hath cometh, and I am confused with babelify env and es2015-commonjs plugins/presets
will wait for a working example.
(I’ve read around a bit and I think I’d wish to utilize “babel” in case I need something from it later, better without an extra file like .babelrc. too many build configs already)
Checkout the updated bundling example for hints how to bundle bpmn-js along with your application.
If you’d like to be a little bit more independent from the future: We offer a pre-packaged variant of our toolkit, too that can be integrated with a single script include.