Skip to content

Commit b38b860

Browse files
committed
Fix Nodent usage of acorn-jsx. (thanks @songawee - see developit/karmatic#8)
1 parent a133de8 commit b38b860

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'acorn-jsx';
12
import fs from 'fs';
23
import { resolve, relative, dirname, basename, extname } from 'path';
34
import chalk from 'chalk';
@@ -6,7 +7,6 @@ import promisify from 'es6-promisify';
67
import glob from 'glob';
78
import autoprefixer from 'autoprefixer';
89
import { rollup, watch } from 'rollup';
9-
import acornJsx from 'acorn-jsx';
1010
import nodent from 'rollup-plugin-nodent';
1111
import commonjs from 'rollup-plugin-commonjs';
1212
import nodeResolve from 'rollup-plugin-node-resolve';
@@ -19,12 +19,10 @@ import prettyBytes from 'pretty-bytes';
1919
import shebangPlugin from 'rollup-plugin-preserve-shebang';
2020
import typescript from 'rollup-plugin-typescript';
2121
import flow from './lib/flow-plugin';
22-
// import exorcist from 'exorcist';
2322
import camelCase from 'camelcase';
2423

2524
const interopRequire = m => m.default || m;
2625
const readFile = promisify(fs.readFile);
27-
// const writeFile = promisify(fs.writeFile);
2826
const stat = promisify(fs.stat);
2927
const isDir = name => stat(name).then( stats => stats.isDirectory() ).catch( () => false );
3028
const isFile = name => stat(name).then( stats => stats.isFile() ).catch( () => false );
@@ -226,7 +224,7 @@ function createConfig(options, entry, format, writeMeta) {
226224
},
227225
parser: {
228226
plugins: {
229-
jsx: acornJsx
227+
jsx: true
230228
}
231229
}
232230
}),

0 commit comments

Comments
 (0)