babel-istanbul-loader icon indicating copy to clipboard operation
babel-istanbul-loader copied to clipboard

Babel Preset Query

Open ccorcos opened this issue 8 years ago • 2 comments

I need to use the babel preset query to resolve the paths to the preset files because my build configurations are in a sibling directory to my application

For example, I'm using this setup for babel:

        {
          test: /\.js$/,
          loader: 'babel',
          exclude: /node_modules/,
          query: {
            presets: [
              'babel-preset-es2015',
              'babel-preset-react',
              'babel-preset-stage-0',
            ].map(require.resolve),
          },
        },

Babelrc doesn't resolve correctly -- any ideas how we could fix this and make the presets a query option?

ccorcos avatar Jun 24 '16 00:06 ccorcos

https://github.com/babel/babel-loader/blob/master/index.js#L36

ccorcos avatar Jun 24 '16 00:06 ccorcos

Indeed, I would like similar support for this to the way it works with the babel-loader, ie:

loader: 'babel-istanbul?presets[]=es2015&cacheDirectory'

bbottema avatar Jul 22 '16 09:07 bbottema