-
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Bug
babel-plugin-console
version: 0.2.1node
version: 9.5.0npm
(oryarn
) version: yarn 1.7.0
Relevant code or config
import React, { Component } from "react";
import scope from "scope.macro";
function add100(a) {
const oneHundred = 100;
scope("Add 100 to another number");
return add(a, oneHundred);
}
function add(a, b) {
return a + b;
}
class App extends Component {
componentDidMount = () => {
add100(1);
};
render() {
return (
<div className="App">
</div>
);
}
}
export default App;
What you did:
npx create-react-app@next --scripts-version=2.0.0-next.66cc7a90
yarn add babel-plugin-console
&yarn add scope.macro
- Inserted above example code from this plugins pages in barebones CRAv2
App.js
yarn start
What happened (please provide anything you think will help):
index.js:2214 ./src/App.js
Module build failed: Error: Unknown substitution "args" given
at Array.forEach (<anonymous>)
at Array.map (<anonymous>)
=============
at Array.map (<anonymous>)
at Array.forEach (<anonymous>)
As far as I know, the upcoming Create-React-App version 2 comes with built-in support for babel-macros.
I also checked with another babel-macro plugin, which is working fine.
Edit: missed a line.
xiaoxiangmoe, CanRau, oneforwonder, vjpr, deftomat and 4 more
Metadata
Metadata
Assignees
Labels
No labels