Skip to content

Commit

Permalink
Resolve #8884 by transpiling acorn-jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
bpeab committed Dec 1, 2019
1 parent 8561e7b commit b280563
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions addons/docs/src/frameworks/common/preset.ts
Expand Up @@ -44,6 +44,18 @@ export function webpack(webpackConfig: any = {}, options: any = {}) {
...module,
rules: [
...(module.rules || []),
{
test: /\.js$/,
include: /node_modules\/acorn-jsx/,
use: [
{
loader: 'babel-loader',
options: {
presets: [[require.resolve('@babel/preset-env'), { modules: 'commonjs' }]],
},
},
],
},
{
test: /\.(stories|story).mdx$/,
use: [
Expand Down

0 comments on commit b280563

Please sign in to comment.