mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 04:01:48 +08:00
CLEANUP && FIX main.ts
This commit is contained in:
parent
bec1e3555e
commit
0e21344abe
@ -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, '..', '..', '..'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -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
|
||||||
|
@ -181,7 +181,6 @@ export default async ({
|
|||||||
alias: {
|
alias: {
|
||||||
...themingPaths,
|
...themingPaths,
|
||||||
...storybookPaths,
|
...storybookPaths,
|
||||||
semver: path.dirname(resolveFrom(__dirname, '@storybook/semver/package.json')),
|
|
||||||
...reactPaths,
|
...reactPaths,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user