Babel-loader: "babel" entry in package.json is not working

Created on 28 May 2017  路  2Comments  路  Source: babel/babel-loader

I'm using a "babel" entry in my package.json, no babel.rc

Jest is working fine (babel config read from package.json) but babel-loader in webpack is not: the babel configuration in the package.json is not applied.

Any thoughts?

//in package.json
    "babel": {
        "presets": [
            "babel-preset-latest",
            "babel-preset-stage-0",
            "babel-preset-react"
        ],
        "plugins": [
            "transform-decorators-legacy",
            "transform-class-properties"
        ]
    },
//in webpack.config.js
            use: [{
                loader: 'babel-loader',
            },{
bug

All 2 comments

Nobody is using package.json to define its babel rules? : (

I'm also using package.json to configure babel

It's working for me, expect when I'm using cacheDirectory, it doesn't rerun after updating the config
I fixed that in #456

Was this page helpful?
0 / 5 - 0 ratings