diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-09-19 18:13:57 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-09-19 19:12:31 +0200 |
| commit | 2faf2e34331703b3bdea3eb487cb8799c8d65377 (patch) | |
| tree | dedc6557ddaa8fedd42d9bdf77950f8f9168ebcb /.storybook/main.js | |
| parent | d1fe9e2164fc5c8fd767b456eecc2a4eb929a33f (diff) | |
refactor(build): replace paths aliases with relative paths
Using paths aliases starting with "@" can be confusing and can lead to
conflict with existings modules. I prefer to use relative paths to
avoid extra configuration in tools because of these aliases.
Diffstat (limited to '.storybook/main.js')
| -rw-r--r-- | .storybook/main.js | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/.storybook/main.js b/.storybook/main.js index 477b09e..ca18e6b 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -1,5 +1,3 @@ -const path = require('path'); - /** * @typedef {import('webpack').Configuration} WebpackConfig */ @@ -35,19 +33,6 @@ const storybookConfig = { /** @type {import('next').NextConfig} */ const nextConfig = require('../next.config'); - // Set modules aliases. - config.resolve.alias = { - ...config.resolve.alias, - '@i18n': path.resolve(__dirname, '../src/i18n'), - '@assets': path.resolve(__dirname, '../src/assets'), - '@components': path.resolve(__dirname, '../src/components'), - '@content': path.resolve(__dirname, '../src/content'), - '@pages': path.resolve(__dirname, '../src/pages'), - '@services': path.resolve(__dirname, '../src/services'), - '@styles': path.resolve(__dirname, '../src/styles'), - '@utils': path.resolve(__dirname, '../src/utils'), - }; - return { ...config, ...nextConfig.webpack }; }, }; |
