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

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -