diff --git a/packages/grafana-ui/src/types/emotion-core-stub.d.ts b/packages/grafana-ui/src/types/emotion-core-stub.d.ts new file mode 100644 index 00000000000..837fc035a76 --- /dev/null +++ b/packages/grafana-ui/src/types/emotion-core-stub.d.ts @@ -0,0 +1,4 @@ +// This stub is required due to Storybook 6.x reliance on @emotion/core +// which causes conflicts with emotion 11 types resulting in bundled +// components throwing ts error `Property 'css' is missing in type...` +export {}; diff --git a/packages/grafana-ui/tsconfig.build.json b/packages/grafana-ui/tsconfig.build.json index 6134388bd9d..165673e82a2 100644 --- a/packages/grafana-ui/tsconfig.build.json +++ b/packages/grafana-ui/tsconfig.build.json @@ -1,4 +1,11 @@ { + "compilerOptions": { + "paths": { + "@emotion/core": ["../../src/types/emotion-core-stub.d.ts"], + "@grafana/slate-react": ["slate-react"], + "@grafana/ui": ["."] + } + }, "exclude": ["**/*.story.tsx", "**/*.test.ts*", "**/*.tmpl.ts", "dist", "node_modules", "src/utils/storybook"], "extends": "./tsconfig.json" }