mirror of
https://github.com/grafana/grafana.git
synced 2024-12-23 15:40:19 -06:00
Chore: webpack alias react and grafana-runtime to share singletons (#81789)
* Chore: webpack alias react and grafana-runtime to share singletons * Move alias to dev webpack, add alias for grafana-data as well * remove whitespace
This commit is contained in:
parent
7852ea012d
commit
57993f65ed
@ -35,6 +35,18 @@ module.exports = (env = {}) => {
|
||||
ignored: /node_modules/,
|
||||
},
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
// Packages linked for development need react to be resolved from the same location
|
||||
react: require.resolve('react'),
|
||||
|
||||
// Also Grafana packages need to be resolved from the same location so they share
|
||||
// the same singletons
|
||||
'@grafana/runtime': path.resolve(__dirname, '../../packages/grafana-runtime'),
|
||||
'@grafana/data': path.resolve(__dirname, '../../packages/grafana-data'),
|
||||
},
|
||||
},
|
||||
|
||||
module: {
|
||||
// Note: order is bottom-to-top and/or right-to-left
|
||||
rules: [
|
||||
|
Loading…
Reference in New Issue
Block a user