How should I transform ES6 node_modules with browserify and babelify?
问题 I'm using gulp, browserify and babelify in order to use ES6 syntax in my project. As soon as I import a node_module, which was also written in ES6, gulp throws an error: 'import' and 'export' may appear only with 'sourceType: module' I've read the proposed solutions on babelify's github page. In short, the two possibilities are: Add a browserify option to the affected node_module's package.json Configure gulp, so that browserify tries to transform all files with babelify (and add an ignore