Static GitHub Issues

[2436] How to exclude node_modules but one package from babel-loader?

prev: Loading Async/Defer some external resources JS?
next: asyncData called on child pages that have not been included in parent

Hi, I have written a raw ES6 package and want to use it in my Nuxt project through npm link during development.

I searched for the setting in webpack. I tried to change the exclude property in extend in nuxt.config.js, but no luck.

  extend(config, ctx) {
     config.module.rules
        .find(aRule => aRule.loader === 'babel-loader')
        .exclude = /node_modules\/(?!my-package\/).*/
  }

Any ideas? Thanks.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2112">#c2112</a>)</em></sub></div>