spin.js
spin.js copied to clipboard
Can not build with babelify
main.js only import module
import { Spinner } from 'spin.js';
package.json
{
"dependencies": {
"babel-core": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babelify": "^8.0.0",
"browserify": "^16.2.0",
"spin.js": "^3.1.0"
},
"browserify": {
"transform": [
[
"babelify", {
"presets": [
"es2015"
]
}
]
]
}
}
run browserify src/assets/js/main.js -o public/js/main.js
got error:
/home/heggi/git/portal/node_modules/spin.js/spin.js:114
export { Spinner };
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'
If I writing own simple module, import it and try build it, all work fine.