build: improve webpack configs for npm link (#12313)
This commit is contained in:
parent
8214237638
commit
bcb8db621c
|
|
@ -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/*", "*"]
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue