Skip to content

Commit

Permalink
fix transform (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
hzoo authored and Andarist committed Apr 11, 2020
1 parent 64bc64b commit 1b6e0e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/rollup-plugin-babel/src/helperPlugin.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export default function importHelperPlugin () {
return {
visitor: {
Program (path, state) {
state.file.addHelper('classCallCheck');
ClassDeclaration (path, state) {
path.replaceWith(state.file.addHelper('classCallCheck'));
}
}
};
Expand Down
4 changes: 2 additions & 2 deletions packages/rollup-plugin-babel/test/helperPlugin.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = function importHelperPlugin () {
return {
visitor: {
Program (path, state) {
state.file.addHelper('classCallCheck');
ClassDeclaration (path, state) {
path.replaceWith(state.file.addHelper('classCallCheck'));
}
}
};
Expand Down

0 comments on commit 1b6e0e7

Please sign in to comment.