diff --git a/superset-frontend/tsconfig.json b/superset-frontend/tsconfig.json index b158eebfb6806..af1fc299e19a9 100644 --- a/superset-frontend/tsconfig.json +++ b/superset-frontend/tsconfig.json @@ -17,6 +17,14 @@ "outDir": "./dist", "pretty": true, "paths": { + "@superset-ui/core": [ + "./node_modules/@superset-ui/core/src", + "./node_modules/@superset-ui/core" + ], + "@superset-ui/chart-controls": [ + "./node_modules/@superset-ui/chart-controls/src", + "./node_modules/@superset-ui/chart-controls" + ], // for supressing errors caused by incompatible @types/react when `npm link` // Ref: https://github.com/Microsoft/typescript/issues/6496#issuecomment-384786222 "*": ["./node_modules/@types/*", "*"] diff --git a/superset-frontend/webpack.config.js b/superset-frontend/webpack.config.js index 209c627c64427..a7b66161bcd09 100644 --- a/superset-frontend/webpack.config.js +++ b/superset-frontend/webpack.config.js @@ -459,6 +459,7 @@ if (isDevMode) { // only allow exact match so imports like `@superset-ui/plugin-name/lib` // and `@superset-ui/plugin-name/esm` can still work. config.resolve.alias[`${pkg}$`] = `${pkg}/src`; + delete config.resolve.alias[pkg]; hasSymlink = true; } });