Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "remove custom-babel-loader",
"packageName": "@fluentui/react-storybook-addon-export-to-sandbox",
"email": "paulmardling@microsoft.com",
"dependentChangeType": "patch"
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe(`webpack`, () => {
enforce: 'post',
test: /\.stories\.(jsx?$|tsx?$)/,
use: {
loader: expect.stringContaining('custom-babel-loader'),
loader: expect.stringContaining('babel-loader'),
options: {
plugins: [
[
Expand Down Expand Up @@ -56,7 +56,7 @@ describe(`webpack`, () => {
test: /\.stories\.tsx?/,
include: /foo-stories/,
use: {
loader: expect.stringContaining('custom-babel-loader'),
loader: expect.stringContaining('babel-loader'),
options: {
plugins: [
[
Expand Down Expand Up @@ -93,7 +93,7 @@ describe(`webpack`, () => {
enforce: 'post',
test: /\.stories\.(jsx?$|tsx?$)/,
use: {
loader: expect.stringContaining('custom-babel-loader'),
loader: expect.stringContaining('babel-loader'),
options: {
plugins: [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ function createBabelLoaderRule(config: Required<PresetConfig>): import('webpack'
*/
enforce: 'post',
use: {
/**
* Custom babel loader wraps the original babel-loader and fixes the incorrect `inputSourceMap` parameter
* that is passed to babel-loader.
**/
loader: require.resolve('./custom-babel-loader'),
loader: require.resolve('babel-loader'),
options: babelLoaderOptionsUpdater({
plugins: [plugin],
}),
Expand Down
4 changes: 4 additions & 0 deletions scripts/storybook/src/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ const swcRule = {
{
loader: 'swc-loader',
options: {
// Parse the source map to an object so subsequent loaders (e.g. babel-loader) receive
// an object rather than the raw JSON string that @swc/core outputs.
// Without this, babel-loader throws: "Error: .inputSourceMap must be a boolean, object, or undefined"
parseMap: true,
jsc: {
target: 'es2019',
parser: {
Expand Down
Loading