diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0ea7962e..373acc5f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -47,7 +47,7 @@ jobs: run: yarn build - name: Run tests run: yarn test - - name: Run tsc and webpack + - name: Run webpack run: yarn bundle components-build-test: @@ -67,7 +67,7 @@ jobs: run: cd ../squiggle-lang && yarn build # - name: Install dependencies for components package # run: yarn - - name: Run tsc and webpack # I'm uncertain if bundle comes before build, it was jotted down in a readme that way but it may have been erroneous. + - name: Run webpack # I'm uncertain if bundle comes before build, it was jotted down in a readme that way but it may have been erroneous. run: yarn bundle - name: Build storybook run: yarn build diff --git a/packages/components/.storybook/main.js b/packages/components/.storybook/main.js index 1562ddbf..60f2ee5d 100644 --- a/packages/components/.storybook/main.js +++ b/packages/components/.storybook/main.js @@ -1,15 +1,11 @@ //const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); +const custom = require('../webpack.config.js'); module.exports = { - /* webpackFinal: async (config) => { - config.resolve.plugins = [ - ...(config.resolve.plugins || []), - new TsconfigPathsPlugin({ - extensions: config.resolve.extensions, - }), - ]; - return config; - },*/ + webpackFinal: async (config) => { + config.resolve.alias = custom.resolve.alias; + return { ...config, module: { ...config.module, rules: config.module.rules.concat(custom.module.rules) } }; + }, "stories": [ "../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"