Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
Ensure absolute path to babel transform
Browse files Browse the repository at this point in the history
  • Loading branch information
foxyblocks committed Jun 2, 2017
1 parent dbd6069 commit 01997bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env node
import fs from 'fs';
import coffeeReactTransform from 'coffee-react-transform';
import path from 'path';
import { convert as decaf } from 'decaffeinate';
import { transform as babelTransform } from 'babel-core';
import camelCase from 'lodash/camelCase';
Expand Down Expand Up @@ -88,7 +89,9 @@ function processFile(file) {
try {
result = babelTransform(result, {
babelrc: false,
plugins: ['transform-react-createelement-to-jsx'],
plugins: [
path.join(__dirname, '../node_modules', 'babel-plugin-transform-react-createelement-to-jsx'),
],
}).code;
} catch (e) {
renderError({ label: 'Babel error', message: e });
Expand Down

0 comments on commit 01997bd

Please sign in to comment.