mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 02:02:12 +08:00
Grafana/schema: Expose dist directory in package.json exports (#101626)
build(schema): expose dist directory in package.json exports so scenes can consume them
This commit is contained in:
@ -24,6 +24,14 @@ try {
|
||||
},
|
||||
},
|
||||
};
|
||||
// Fix so scenes can access `@grafana/schema` nested dist import paths e.g.
|
||||
// import {} from '@grafana/schema/dist/esm/raw/composable/bargauge/panelcfg/x/BarGaugePanelCfg_types.gen'
|
||||
if (pkgJson.content.name === '@grafana/schema') {
|
||||
exports['./dist/*'] = {
|
||||
types: './dist/*',
|
||||
default: './dist/*',
|
||||
};
|
||||
}
|
||||
|
||||
pkgJson.update({
|
||||
main: cjsIndex,
|
||||
|
Reference in New Issue
Block a user