Skip to content

Commit

Permalink
tweak configs even more to reduce warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
electrovir committed May 4, 2022
1 parent bea2a57 commit 0ba4976
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 103 deletions.
3 changes: 2 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"ignorePaths": [
"graphics",
"storybook-static"
".storybook-dist"
],
"import": ".cspell-base.json",
"words": [
"dfinity",
"elems",
"ERESOLVE",
"globby",
"postpublish",
"preinstall",
Expand Down
8 changes: 6 additions & 2 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
import {StorybookConfig} from '@storybook/core-common';

/** These configs values are exported as individual variables to appease some storybook build warnings. */

export const stories: StorybookConfig['stories'] = [
'../src/**/*.stories.mdx',
'../src/**/*.stories.@(js|jsx|ts|tsx)',
];
export const addons: StorybookConfig['addons'] = [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
];
export const framework: StorybookConfig['framework'] = '@storybook/react';

const maxAssetSize = 1024 * 1024;
export const staticDirs: StorybookConfig['staticDirs'] = ['./public'];

export const webpackFinal: StorybookConfig['webpackFinal'] = (config) => {
const maxAssetSize = 1024 * 1024;

config.optimization = {
...config.optimization,
splitChunks: {
Expand All @@ -34,4 +37,5 @@ export const webpackFinal: StorybookConfig['webpackFinal'] = (config) => {
export const features: StorybookConfig['features'] = {
/** Decrease bundle size */
storyStoreV7: true,
postcss: false,
};
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ Make sure to run `npm install` first.
npm run build
```
- Adding new dependencies:
The peer dependencies between our deps are all messed up, so if installing a new package fails, try using the `--legacy-peer-deps` flag.
The peer dependencies between our deps are all messed up, so if you see a bunch of `ERESOLVE overriding peer dependency` errors, try using the `--legacy-peer-deps` flag: `npm i --legacy-peer-deps <package-name>`
Loading

0 comments on commit 0ba4976

Please sign in to comment.