From 23e91d51a270f5b90b6cbad8aada325f57050ff0 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 24 Feb 2020 11:13:30 +0100 Subject: [PATCH] Merge pull request #9790 from lmaze/8884-fix-addon-docs-ie11 Addon-docs: Restore IE11 compat on Windows by transpiling correctly acorn-jsx for this OS (#8884) --- addons/docs/src/frameworks/common/preset.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/docs/src/frameworks/common/preset.ts b/addons/docs/src/frameworks/common/preset.ts index f1c5764d6508..2de39d3e46eb 100644 --- a/addons/docs/src/frameworks/common/preset.ts +++ b/addons/docs/src/frameworks/common/preset.ts @@ -1,5 +1,5 @@ -/* eslint-disable import/no-extraneous-dependencies */ import createCompiler from '@storybook/addon-docs/mdx-compiler-plugin'; +import path from 'path'; import remarkSlug from 'remark-slug'; import remarkExternalLinks from 'remark-external-links'; @@ -52,7 +52,7 @@ export function webpack(webpackConfig: any = {}, options: any = {}) { ...(module.rules || []), { test: /\.js$/, - include: /node_modules\/acorn-jsx/, + include: new RegExp(`node_modules\\${path.sep}acorn-jsx`), use: [ { loader: 'babel-loader',