javascript - How can I tell Babel to ignore an es6 import when using the Rollup Babel plugin? -
is there way me tell babel ignore imports, example don't want babel touch es5 imports polyfills.
i have tried exclude option doesn't anything. here dev dependancies:
"devdependencies": {     "babel-preset-es2015-rollup": "^1.2.0",     "rollup": "^0.36.3",     "rollup-plugin-babel": "^2.6.1" }   also here index.js comments showing want babel ignore:
/* babel don"t touch these please */ import "parties/promise.js"; import "parties/fetch.js"; import "parties/domtastic.min.js"; /* end babel no touchy */    /* babel transpile these */ import "settings/global.js";    import "settings/tabs.js"; import "modules/helpers.js"; import "modules/modal.js"; import "modules/notify.js"; import "modules/tabs.js"; /* end babel transpile */   how can this? need package deal this?
any appreciated, thanks.
just use exclude setting of babel plugin:
// rollup.config.js import babel 'rollup-plugin-babel';  export default {   // ...   plugins: [     babel({       exclude: [ 'node_modules/**', 'src/parties/**' ]     })   ] };      
Comments
Post a Comment