Fix Babel compilation error
The default Storybook Babel config did not recognize the `public` keyword in our custom errors (e.g. `ExhaustivityCheckingError` and `RedactableError`). To fix this, we can use Storybook's V7 mode to supply a custom Babel config. This fixes the compilation error. See: https://storybook.js.org/docs/react/configure/babel
This commit is contained in:
16
extensions/ql-vscode/.babelrc.json
Normal file
16
extensions/ql-vscode/.babelrc.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"sourceType": "unambiguous",
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"targets": {
|
||||
"chrome": 100
|
||||
}
|
||||
}
|
||||
],
|
||||
"@babel/preset-typescript",
|
||||
"@babel/preset-react"
|
||||
],
|
||||
"plugins": []
|
||||
}
|
||||
@@ -12,6 +12,9 @@ const config: StorybookConfig = {
|
||||
core: {
|
||||
builder: "@storybook/builder-webpack5",
|
||||
},
|
||||
features: {
|
||||
babelModeV7: true,
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
|
||||
Reference in New Issue
Block a user