Skip to content

Commit

Permalink
Addon-docs: Restore IE11 compat by transpiling acorn-jsx (#9021)
Browse files Browse the repository at this point in the history
Addon-docs: Restore IE11 compat by transpiling acorn-jsx
  • Loading branch information
shilman committed Dec 2, 2019
2 parents 1e53a3a + b280563 commit 2a60242
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 2a60242

Please sign in to comment.