Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
fix can't import styled
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyongjie committed Oct 18, 2021
1 parent 9abe2da commit 7457947
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/superset-ui-demo/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const packages = readdirSync(basePath).filter(name => {
return stat.isSymbolicLink();
});

// find @superset-ui/core source
const corePath = path.resolve(__dirname, '../../../packages/superset-ui-core');

const PLUGIN_PACKAGES_PATH_REGEXP = new RegExp(
`${path.resolve(__dirname, '../../../plugins/(legacy-)*(plugin|preset)-')}.+/src`,
);
Expand Down Expand Up @@ -59,6 +62,12 @@ module.exports = {
),
});

// todo: remove hard code after move storybook to superset repo.
config.resolve.alias['@emotion/styled'] = path.resolve(
corePath,
'./node_modules/@emotion/styled',
);

config.devtool = 'eval-cheap-module-source-map';
config.devServer = {
...config.devServer,
Expand Down

0 comments on commit 7457947

Please sign in to comment.