Skip to content

Commit

Permalink
build: update webpack for npm linking plugins (apache#11253)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmud authored Oct 13, 2020
1 parent 16f7b2b commit eb389ba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
3 changes: 2 additions & 1 deletion superset-frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@
"./node_modules/*superset-ui*/**/types/**/*",
// and the type defs of their dependencies
"./node_modules/*superset-ui*/**/node_modules/**/*.d.ts"
]
],
"exclude": ["./node_modules/*superset-ui*/**/node_modules/@superset-ui/**/*"]
}
15 changes: 11 additions & 4 deletions superset-frontend/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,19 @@ const config = {
},
},
resolve: {
modules: [APP_DIR, 'node_modules'],
alias: {
src: path.resolve(APP_DIR, './src'),
'react-dom': '@hot-loader/react-dom',
stylesheets: path.resolve(APP_DIR, './stylesheets'),
images: path.resolve(APP_DIR, './images'),
spec: path.resolve(APP_DIR, './spec'),
// force using absolute import path of the @superset-ui/core and @superset-ui/chart-controls
// so that we can `npm link` viz plugins without linking these two base packages
'@superset-ui/core': path.resolve(
APP_DIR,
'./node_modules/@superset-ui/core',
),
'@superset-ui/chart-controls': path.resolve(
APP_DIR,
'./node_modules/@superset-ui/chart-controls',
),
},
extensions: ['.ts', '.tsx', '.js', '.jsx'],
symlinks: false,
Expand Down

0 comments on commit eb389ba

Please sign in to comment.