From cd278d8cd07c10c529c67406459f37f0eba77373 Mon Sep 17 00:00:00 2001 From: lmaze Date: Fri, 7 Feb 2020 18:19:53 +0100 Subject: [PATCH] Addon-docs: Restore IE11 compat on Windows by transpiling correctly acorn-jsx for this OS (#8884) --- addons/docs/src/frameworks/common/preset.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/docs/src/frameworks/common/preset.ts b/addons/docs/src/frameworks/common/preset.ts index f1c5764d650..7b19e533ff3 100644 --- a/addons/docs/src/frameworks/common/preset.ts +++ b/addons/docs/src/frameworks/common/preset.ts @@ -1,5 +1,6 @@ /* 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 +53,7 @@ export function webpack(webpackConfig: any = {}, options: any = {}) { ...(module.rules || []), { test: /\.js$/, - include: /node_modules\/acorn-jsx/, + include: path.join(__dirname, '../../../../../node_modules/acorn-jsx'), use: [ { loader: 'babel-loader',