Skip to content

Commit

Permalink
fix presets not found is npm2 and tnpm4
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed May 17, 2016
1 parent 0612dfb commit b488afe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/compiler.js
Expand Up @@ -12,7 +12,11 @@ const jsCompiler = ext => {

const content = fs.readFileSync(filename, 'utf-8');
const code = babel.transform(content, {
presets: ['es2015', 'react', 'stage-0'],
presets: [
require.resolve('babel-preset-es2015'),
require.resolve('babel-preset-react'),
require.resolve('babel-preset-stage-0'),
],
ast: false,
}).code;

Expand Down

0 comments on commit b488afe

Please sign in to comment.