Skip to content

Commit

Permalink
fix: storybook (#3537)
Browse files Browse the repository at this point in the history
* chore: update commitlint deps

* fix(storybook): fix runtime error
  • Loading branch information
mainframev committed Jul 25, 2022
1 parent 048b1ee commit e7680e4
Show file tree
Hide file tree
Showing 4 changed files with 338 additions and 26 deletions.
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -44,8 +44,9 @@
},
"devDependencies": {
"@babel/core": "^7.18.2",
"@commitlint/config-conventional": "^16.2.4",
"@kiwicom/browserslist-config": "^2.1.0",
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"@kiwicom/browserslist-config": "^3.0.0",
"@lerna/project": "^3.21.0",
"@size-limit/file": "^6.0.3",
"@size-limit/webpack": "^6.0.3",
Expand Down
25 changes: 24 additions & 1 deletion packages/orbit-components/.storybook/main.js
Expand Up @@ -37,6 +37,29 @@ module.exports = {
exclude: /node_modules\/(?!(loki)\/).*/, // Loki is not transpilled, throws error in IE 11
});

return config;
const rules = [
{
test: /\.(js|mjs|jsx|ts|tsx)$/,
exclude: /node_modules/,
loader: "babel-loader",
options: {
presets: [
[
"@babel/preset-env",
{
modules: "commonjs",
},
],
],
},
},
];

return {
...config,
module: {
rules: [...rules, ...config.module.rules],
},
};
},
};
2 changes: 1 addition & 1 deletion packages/orbit-components/package.json
Expand Up @@ -104,7 +104,7 @@
"@babel/types": "^7.18.9",
"@bunchtogether/vite-plugin-flow": "^1.0.1",
"@emotion/core": "^11.0.0",
"@kiwicom/browserslist-config": "^2.1.0",
"@kiwicom/browserslist-config": "^3.0.0",
"@nanostores/react": "^0.2.0",
"@nanostores/router": "^0.3.1",
"@octokit/rest": "^18.0.14",
Expand Down

0 comments on commit e7680e4

Please sign in to comment.