需要将 [email protected]
编译成 ES5
,找了一圈没有合适的,自己弄了个,记录下 package.json 配置。
{
"private": true,
"scripts": {
"build": "npm run babel && npm run min",
"babel": "babel node_modules/konva/konva.js --out-file konva.es5.js",
"min": "uglifyjs konva.es5.js -o konva.es5.min.js -c -m"
},
"dependencies": {
"konva": "8.3.14"
},
"devDependencies": {
"babel-cli": "6.26.0",
"babel-preset-es2015": "6.24.1",
"babel-preset-stage-2": "6.24.1",
"uglify-js": "3.17.4"
},
"browserslist": "last 2 versions",
"babel": {
"presets": [
"es2015",
"stage-2"
]
}
}
标签:ES5,min,babel,编译成,js,ES2015,konva
From: https://www.cnblogs.com/blackcat/p/16979542.html