rahul
rahul

Reputation: 100

The plugin "transform-class-properties" didn't export a Plugin instance

I am willing to use ES6/7 transform class properties feature using Babel. Following the steps mentioned here. I have created a .babelrc file with contents:

{
  "plugins": ["transform-class-properties"]
}

On executing webpack -p following error shows up:

ERROR in ./src/main.js
Module build failed: TypeError: The plugin "transform-class-properties" didn't export a Plugin instance
    at PluginManager.validate (../node_modules/babel-core/lib/transformation/file/plugin-manager.js:164:13)

Any idea whats wrong? Thanks.

Upvotes: 1

Views: 2271

Answers (1)

loganfsmyth
loganfsmyth

Reputation: 161457

transform-class-properties is a Babel 6 plugin, and you are trying to use it with Babel 5. In Babel 5, you would do

"optional": ["es7.classProperties"]

or update to Babel 6.

Upvotes: 2

Related Questions