How to use with with babel transform-class-properties plugin?
See original GitHub issueMy .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:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.For now, I’ll close this issue in favor of the new releases.