mirror of https://github.com/apache/superset.git
build: fix emotion theme errors when npm link @superset-ui/core (#12510)
This commit is contained in:
parent
78baf46eb2
commit
eec78560f2
|
@ -274,8 +274,12 @@ const config = {
|
||||||
modules: [APP_DIR, 'node_modules'],
|
modules: [APP_DIR, 'node_modules'],
|
||||||
alias: {
|
alias: {
|
||||||
'react-dom': '@hot-loader/react-dom',
|
'react-dom': '@hot-loader/react-dom',
|
||||||
// force using absolute import path of the @superset-ui/core and @superset-ui/chart-controls
|
// Force using absolute import path of some packages in the root node_modules,
|
||||||
// so that we can `npm link` viz plugins without linking these two base packages
|
// as they can be dependencies of other packages via `npm link`.
|
||||||
|
// Both `@emotion/core` and `@superset-ui/core` remember some globals within
|
||||||
|
// module after imported, which will not be available everywhere if two
|
||||||
|
// different copies of the same module are imported in different places.
|
||||||
|
'@emotion/core': path.resolve(APP_DIR, './node_modules/@emotion/core'),
|
||||||
'@superset-ui/core': path.resolve(
|
'@superset-ui/core': path.resolve(
|
||||||
APP_DIR,
|
APP_DIR,
|
||||||
'./node_modules/@superset-ui/core',
|
'./node_modules/@superset-ui/core',
|
||||||
|
|
Loading…
Reference in New Issue