CLEANUP && FIX main.ts

This commit is contained in:
Norbert de Langen 2020-06-10 15:37:50 +02:00
parent bec1e3555e
commit 0e21344abe
No known key found for this signature in database
GPG Key ID: 976651DA156C2825
3 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,6 @@
// @ts-ignore // eslint-disable-next-line import/no-extraneous-dependencies
import { Configuration } from 'webpack';
const path = require('path'); const path = require('path');
module.exports = { module.exports = {
@ -26,10 +28,12 @@ module.exports = {
'@storybook/addon-links', '@storybook/addon-links',
'@storybook/addon-a11y', '@storybook/addon-a11y',
], ],
webpackFinal: (config) => { webpackFinal: (config: Configuration) => {
// add monorepo root as a valid directory to import modules from // add monorepo root as a valid directory to import modules from
config.resolve.plugins.forEach((p) => { config.resolve.plugins.forEach((p) => {
// @ts-ignore
if (Array.isArray(p.appSrcs)) { if (Array.isArray(p.appSrcs)) {
// @ts-ignore
p.appSrcs.push(path.join(__dirname, '..', '..', '..')); p.appSrcs.push(path.join(__dirname, '..', '..', '..'));
} }
}); });

View File

@ -140,7 +140,6 @@ export default async ({
alias: { alias: {
...themingPaths, ...themingPaths,
...uiPaths, ...uiPaths,
semver: require.resolve('@storybook/semver'),
}, },
plugins: [ plugins: [
// Transparently resolve packages via PnP when needed; noop otherwise // Transparently resolve packages via PnP when needed; noop otherwise

View File

@ -181,7 +181,6 @@ export default async ({
alias: { alias: {
...themingPaths, ...themingPaths,
...storybookPaths, ...storybookPaths,
semver: path.dirname(resolveFrom(__dirname, '@storybook/semver/package.json')),
...reactPaths, ...reactPaths,
}, },