You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var _keepImports = require("./fixtures/keep-imports.macro");
137
-
138
-
var _keepImports2 = _interopRequireDefault(_keepImports);
139
-
140
-
function _interopRequireDefault(obj) {returnobj&&obj.__esModule?obj: { default: obj }; }
141
-
142
-
var red = (0, _keepImports2.default)('noop');
136
+
import macro from './fixtures/keep-imports.macro';
137
+
const red = macro('noop');
143
138
144
139
`;
145
140
@@ -150,7 +145,7 @@ errorThrower('hey')
150
145
151
146
↓ ↓ ↓ ↓ ↓ ↓
152
147
153
-
Error: ./fixtures/error-thrower.macro: very unhelpful
148
+
Error: very unhelpful
154
149
155
150
`;
156
151
@@ -182,7 +177,6 @@ const Div = styled.div\`
182
177
const red = css\`
183
178
background-color: red;
184
179
\`;
185
-
186
180
const Div = styled.div\`
187
181
composes: \${red}
188
182
color: blue;
@@ -208,7 +202,7 @@ unwrapped('hey')
208
202
209
203
↓ ↓ ↓ ↓ ↓ ↓
210
204
211
-
Error: The macro imported from "./fixtures/non-wrapped.macro" must be wrapped in "createMacro" which you can get from "babel-plugin-macros". Please refer to the documentation to see how to do this properly: https://github.com/kentcdodds/babel-plugin-macros/blob/master/other/docs/author.md#writing-a-macro
Copy file name to clipboardExpand all lines: src/index.js
-1Lines changed: 0 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -178,7 +178,6 @@ function applyMacros({
178
178
constmacro=interopRequire(requirePath)
179
179
if(!macro.isBabelMacro){
180
180
thrownewError(
181
-
// eslint-disable-next-line prefer-template
182
181
`The macro imported from "${source}" must be wrapped in "createMacro" `+
183
182
`which you can get from "babel-plugin-macros". `+
184
183
`Please refer to the documentation to see how to do this properly: https://github.com/kentcdodds/babel-plugin-macros/blob/master/other/docs/author.md#writing-a-macro`,
0 commit comments