Plugins: externalise jsx-runtime (#108478)
* feat(plugins): externalise jsx-runtime to prevent plugins bundling separate versions * feat(plugins): provide react/jsx-dev-runtime to plugins to prevent prod only bugs
This commit is contained in:
@@ -100,6 +100,10 @@ export const sharedDependenciesMap = {
|
||||
moment: () => import('moment').then((module) => ({ ...module, __useDefault: true })),
|
||||
prismjs: () => import('prismjs'),
|
||||
react: () => import('react'),
|
||||
// Externalise react/jsx-runtime to align with runtime version of react.
|
||||
// This should make major react update easier to manage in the future.
|
||||
'react/jsx-runtime': () => import('react/jsx-runtime'),
|
||||
'react/jsx-dev-runtime': () => import('react/jsx-dev-runtime'),
|
||||
'react-dom': () => import('react-dom'),
|
||||
// bundling grafana-ui in plugins requires sharing react-inlinesvg for the icon cache
|
||||
'react-inlinesvg': () => import('react-inlinesvg'),
|
||||
|
||||
Reference in New Issue
Block a user