mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Grafana UI: Fix nonexistent indexof module for plugin tests (#50529)
* fix(grafana-ui): prevent module resolution failure where component-indexof appears as indexof * chore(grafana-ui): update comment explaining need for alias plugin
This commit is contained in:
parent
bda47df4ad
commit
6a4906ef7e
@ -97,6 +97,7 @@
|
||||
"@babel/core": "7.18.2",
|
||||
"@grafana/tsconfig": "^1.2.0-rc1",
|
||||
"@mdx-js/react": "1.6.22",
|
||||
"@rollup/plugin-alias": "^3.1.9",
|
||||
"@rollup/plugin-commonjs": "22.0.0",
|
||||
"@rollup/plugin-node-resolve": "13.3.0",
|
||||
"@storybook/addon-a11y": "6.4.21",
|
||||
@ -169,6 +170,7 @@
|
||||
"rollup-plugin-sourcemaps": "0.6.3",
|
||||
"rollup-plugin-svg-import": "^1.6.0",
|
||||
"rollup-plugin-terser": "7.0.2",
|
||||
"rollup-plugin-visualizer": "^5.6.0",
|
||||
"sass-loader": "13.0.0",
|
||||
"storybook-dark-mode": "1.1.0",
|
||||
"style-loader": "3.3.1",
|
||||
|
@ -1,3 +1,4 @@
|
||||
import alias from '@rollup/plugin-alias';
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import resolve from '@rollup/plugin-node-resolve';
|
||||
import svg from 'rollup-plugin-svg-import';
|
||||
@ -39,6 +40,9 @@ const buildCjsPackage = ({ env }) => {
|
||||
'@emotion/css',
|
||||
],
|
||||
plugins: [
|
||||
// rc-time-picker has a transitive dependency on component-indexof which
|
||||
// when bundled via `component-classes` imports a nonexistent `indexof` module.
|
||||
alias({ entries: [{ find: 'indexof', replacement: 'component-indexof' }] }),
|
||||
commonjs({
|
||||
include: /node_modules/,
|
||||
ignoreTryCatch: false,
|
||||
@ -49,4 +53,4 @@ const buildCjsPackage = ({ env }) => {
|
||||
],
|
||||
};
|
||||
};
|
||||
export default [buildCjsPackage({ env: 'development' }), buildCjsPackage({ env: 'production' })];
|
||||
export default [buildCjsPackage({ env: 'development' })];
|
||||
|
31
yarn.lock
31
yarn.lock
@ -4684,6 +4684,7 @@ __metadata:
|
||||
"@react-aria/menu": 3.4.4
|
||||
"@react-aria/overlays": 3.8.2
|
||||
"@react-stately/menu": 3.2.7
|
||||
"@rollup/plugin-alias": ^3.1.9
|
||||
"@rollup/plugin-commonjs": 22.0.0
|
||||
"@rollup/plugin-node-resolve": 13.3.0
|
||||
"@sentry/browser": 6.19.7
|
||||
@ -4796,6 +4797,7 @@ __metadata:
|
||||
rollup-plugin-sourcemaps: 0.6.3
|
||||
rollup-plugin-svg-import: ^1.6.0
|
||||
rollup-plugin-terser: 7.0.2
|
||||
rollup-plugin-visualizer: ^5.6.0
|
||||
rxjs: 7.5.5
|
||||
sass-loader: 13.0.0
|
||||
slate: 0.47.8
|
||||
@ -7652,6 +7654,17 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@rollup/plugin-alias@npm:^3.1.9":
|
||||
version: 3.1.9
|
||||
resolution: "@rollup/plugin-alias@npm:3.1.9"
|
||||
dependencies:
|
||||
slash: ^3.0.0
|
||||
peerDependencies:
|
||||
rollup: ^1.20.0||^2.0.0
|
||||
checksum: cefae9dfb7c30f0dc78d24f4ad9ccb8a0878397b313c0fa9d0f519667394941c58a930d968d841e25aee43b0fb892d1e3f7edbb55e8197f191cce7da6a50b882
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@rollup/plugin-commonjs@npm:22.0.0":
|
||||
version: 22.0.0
|
||||
resolution: "@rollup/plugin-commonjs@npm:22.0.0"
|
||||
@ -26412,7 +26425,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"nanoid@npm:^3.3.3, nanoid@npm:^3.3.4":
|
||||
"nanoid@npm:^3.1.32, nanoid@npm:^3.3.3, nanoid@npm:^3.3.4":
|
||||
version: 3.3.4
|
||||
resolution: "nanoid@npm:3.3.4"
|
||||
bin:
|
||||
@ -32205,6 +32218,22 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"rollup-plugin-visualizer@npm:^5.6.0":
|
||||
version: 5.6.0
|
||||
resolution: "rollup-plugin-visualizer@npm:5.6.0"
|
||||
dependencies:
|
||||
nanoid: ^3.1.32
|
||||
open: ^8.4.0
|
||||
source-map: ^0.7.3
|
||||
yargs: ^17.3.1
|
||||
peerDependencies:
|
||||
rollup: ^2.0.0
|
||||
bin:
|
||||
rollup-plugin-visualizer: dist/bin/cli.js
|
||||
checksum: 1036a3873f3b6a0c46d692538aaac5dc9f7a7b2a5aec9e7ab816aaf8a31576ae750f415e1019e401707d18490b634a982fbe8c22d9761cafbd9b12c756e7fd99
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"rollup@npm:2.74.1":
|
||||
version: 2.74.1
|
||||
resolution: "rollup@npm:2.74.1"
|
||||
|
Loading…
Reference in New Issue
Block a user