Bugfix/fix storybook setup (#1976)
* Fix Storybook setup * Update changelog
This commit is contained in:
@@ -1,24 +1,14 @@
|
||||
const rootMain = require('../../../.storybook/main');
|
||||
|
||||
module.exports = {
|
||||
...rootMain,
|
||||
|
||||
core: { ...rootMain.core, builder: 'webpack5' },
|
||||
|
||||
stories: [
|
||||
...rootMain.stories,
|
||||
'../src/lib/**/*.stories.mdx',
|
||||
'../src/lib/**/*.stories.@(js|jsx|ts|tsx)'
|
||||
],
|
||||
addons: ['@storybook/addon-essentials', ...rootMain.addons],
|
||||
webpackFinal: async (config, { configType }) => {
|
||||
// apply any global webpack configs that might have been specified in .storybook/main.js
|
||||
if (rootMain.webpackFinal) {
|
||||
config = await rootMain.webpackFinal(config, { configType });
|
||||
}
|
||||
|
||||
// add your own webpack tweaks if needed
|
||||
|
||||
return config;
|
||||
}
|
||||
const config = {
|
||||
addons: ['@storybook/addon-essentials'],
|
||||
framework: {
|
||||
name: '@storybook/angular',
|
||||
options: {}
|
||||
},
|
||||
stories: ['../**/*.stories.@(js|jsx|ts|tsx|mdx)']
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
// To customize your webpack configuration you can use the webpackFinal field.
|
||||
// Check https://storybook.js.org/docs/react/builders/webpack#extending-storybooks-webpack-config
|
||||
// and https://nx.dev/packages/storybook/documents/custom-builder-configs
|
||||
|
@@ -1 +1 @@
|
||||
import '!style-loader!css-loader!sass-loader!../../../apps/client/src/styles.scss';
|
||||
// import '!style-loader!css-loader!sass-loader!../../../apps/client/src/styles.scss';
|
||||
|
@@ -3,6 +3,14 @@
|
||||
"compilerOptions": {
|
||||
"emitDecoratorMetadata": true
|
||||
},
|
||||
"exclude": ["../**/*.spec.ts", "../**/*.test.ts", "jest.config.ts"],
|
||||
"include": ["../src/**/*", "*.js"]
|
||||
|
||||
"exclude": ["../**/*.spec.ts"],
|
||||
"include": [
|
||||
"../src/**/*.stories.mdx",
|
||||
"../src/**/*.stories.js",
|
||||
"../src/**/*.stories.jsx",
|
||||
"../src/**/*.stories.ts",
|
||||
"../src/**/*.stories.tsx",
|
||||
"*.js"
|
||||
]
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@
|
||||
},
|
||||
"build-storybook": {
|
||||
"executor": "@storybook/angular:build-storybook",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"outputs": ["{options.outputDir}"],
|
||||
"options": {
|
||||
"outputDir": "dist/storybook/ui",
|
||||
"configDir": "libs/ui/.storybook",
|
||||
@@ -52,6 +52,18 @@
|
||||
"quiet": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"static-storybook": {
|
||||
"executor": "@nx/web:file-server",
|
||||
"options": {
|
||||
"buildTarget": "ui:build-storybook",
|
||||
"staticFilePath": "dist/storybook/ui"
|
||||
},
|
||||
"configurations": {
|
||||
"ci": {
|
||||
"buildTarget": "ui:build-storybook:ci"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": []
|
||||
|
Reference in New Issue
Block a user