Thank you! As you can see I am using babelify and before the version upgrade it worked like this:
"devDependencies": {
"babel-core": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babelify": "^8.0.0",
"browserify": "^16.2.3",
"eslint": "^4.18.1",
"eslint-plugin-bpmn-io": "^0.4.1",
"grunt": "^1.0.3",
"grunt-browserify": "^5.0.0",
"grunt-cli": "^1.3.2",
"grunt-contrib-connect": "~1.0.2",
"grunt-contrib-copy": "~1.0.0",
"grunt-contrib-less": "^1.0.1",
"grunt-contrib-watch": "~1.0.0",
"load-grunt-tasks": "~3.5.0",
"npm-run-all": "^4.1.3",
"stringify": "^3.1.0",
"time-grunt": "^0.3.2",
"watchify": "^3.10.0"
},
"dependencies": {
"bpmn-js": "^3.1.0",
"bpmn-js-properties-panel": "file:C:/repositories/bpmn-js-properties-panel",
"bpmn-js-token-simulation": "file:C:/repositories/bpmn-js-token-simulation",
"camunda-bpmn-moddle": "^3.0.0",
"diagram-js": "^3.0.0",
"diagram-js-origin": "^1.2.0",
"inherits": "^2.0.1",
"jquery": "^3.3.1",
"min-dash": "^3.2.0",
"min-dom": "^3.1.1",
"tiny-svg": "^2.2.0"
}
I am also using global babelify transform, see my Gruntfile.js:
var path = require('path');
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
require('time-grunt')(grunt);
/**
* Resolve external project resource as file path
*/
function resolvePath(project, file) {
return path.join(path.dirname(require.resolve(project)), file);
}
grunt.initConfig({
config: {
dist: '../../resources/bpmn'
},
browserify: {
options: {
browserifyOptions: {
debug: true
},
transform: [
[ 'stringify', {
extensions: [ '.bpmn' ]
} ],
[ 'babelify', {
global: true
} ]
]
},
watch: {
options: {
watch: true
},
files: {
'<%= config.dist %>/modeler.js': [ 'app/**/modeler.js' ],
'<%= config.dist %>/viewer.js': [ 'app/**/viewer.js' ]
}
},
app: {
files: {
'<%= config.dist %>/modeler.js': [ 'app/**/modeler.js' ],
'<%= config.dist %>/viewer.js': [ 'app/**/viewer.js' ]
}
}
},
copy: {
bpmn_js: {
files: [
{
expand: true,
cwd: resolvePath('bpmn-js', 'dist'),
src: ['**/*.*', '!**/*.js'],
dest: '<%= config.dist %>/vendor/bpmn-js'
}
]
},
app: {
files: [
{
expand: true,
cwd: 'app/',
src: ['**/*.*', '!**/*.js'],
dest: '<%= config.dist %>/'
},
{
expand: true,
cwd: 'styles/',
src: [
'colorpicker-icon.svg',
'line-type-picker-icon.svg',
'line-type-clear-icon.svg',
'line-type-dotted-icon.svg',
'line-type-thick-icon.svg',
'line-type-curved-icon.svg',
'line-type-curved-thick-icon.svg',
'label-size-picker-icon.svg',
'label-size-clear-icon.svg',
'label-size-8px-icon.svg',
'label-size-16px-icon.svg',
'label-size-24px-icon.svg',
'label-style-picker-icon.svg',
'label-style-clear-icon.svg',
'label-style-italic-icon.svg',
'label-style-bold-icon.svg',
'label-style-italicBold-icon.svg',
'route.svg',
'route_with_hover_on.svg',
'bpmn-js-token-simulation.css',
'normalize.css'
],
dest: '<%= config.dist %>/css/'
}
]
}
},
less: {
options: {
dumpLineNumbers: 'comments',
paths: [
'node_modules'
]
},
styles: {
files: {
'<%= config.dist %>/css/app.css': 'styles/app.less',
'<%= config.dist %>/css/context-pads.css': 'styles/context-pads.less'
}
}
},
watch: {
options: {
livereload: 35730
},
samples: {
files: [ 'app/**/*.*', 'styles/**/*.*' ],
tasks: [ 'copy:app' ]
},
less: {
files: [
'styles/**/*.less',
'node_modules/bpmn-js-properties-panel/styles/**/*.less'
],
tasks: [
'less'
]
}
},
connect: {
livereload: {
options: {
port: 9014,
livereload: true,
hostname: 'localhost',
open: true,
base: [
'<%= config.dist %>'
]
}
}
}
});
// tasks
grunt.registerTask('build', [ 'copy', 'less', 'browserify:app' ]);
grunt.registerTask('auto-build', [
'copy',
'less',
'browserify:watch',
'connect:livereload',
'watch'
]);
grunt.registerTask('default', [ 'build' ]);
};