question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use with with babel transform-class-properties plugin?

See original GitHub issue

My .babelrc

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

But I have this error:

Module parse failed: Unexpected token (46:21)
You may need an appropriate loader to handle this file type.
| 
| export default class Button extends Component {
>     static propTypes = {
...

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jbcocherycommented, Aug 13, 2018

I ran into the same issue, it happens when you try to install docz in a subfolder, for example /docz and not at the project’s root. I suppose this has something to do with paths.root being used as webpack’s context here but I haven’t investigated more than that.

0reactions
pedronauckcommented, Aug 3, 2018

For now, I’ll close this issue in favor of the new releases.

Read more comments on GitHub >

github_iconTop Results From Across the Web

babel/plugin-proposal-class-properties
NOTE**: This plugin is included in `@babel/preset-env`, ... Below is a class with four class properties which will be transformed. class Bork {...
Read more >
babel-plugin-transform-class-properties - npm
This plugin transforms static class properties as well as properties declared with the property initializer syntax. Latest version: 6.24.1, ...
Read more >
Babel's Transform Class Properties Plugin: How it Works and ...
In this post, we'll go over a particularly useful Babel plugin for your React apps and how you can use it to write...
Read more >
How do I install node module @babel/plugin-transform-class ...
6" entry), I think you are looking for npm install --save-dev @babel/plugin-proposal-class-properties which is the new version of the plugin for ...
Read more >
babel-plugin-transform-class-properties - npm package - Snyk
This plugin transforms static class properties as well as properties declared with the property initializer syntax For more information about how to use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found