Add resolution strategies to storybook webpack

This commit is contained in:
Sam Nolan 2022-03-25 10:57:52 +11:00
parent 271424a912
commit bf73dba3ef
2 changed files with 7 additions and 11 deletions

View File

@ -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

View File

@ -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)"