Compare commits

...

25 Commits

Author SHA1 Message Date
Jack Westbrook
a19b14a54a chore(yarn): dedupe lock file 2025-02-18 10:17:58 +01:00
Jack Westbrook
48793907a0 refactor(plugin-configs): use the amd option rather than hacking per node_module for amd deps 2025-02-18 10:17:34 +01:00
Jack Westbrook
c611c0bbd4 build(plugins-config): hacky attempt to work around define.amd umd modules breaking runtime 2025-02-18 10:17:34 +01:00
Jack Westbrook
1a492a0eb8 chore(decoupled-plugins): bump rspack to latest 2025-02-18 10:17:33 +01:00
Jack Westbrook
8df4243a8c chore(e2e-plugins): fix stray rspack/cli version 2025-02-18 10:17:19 +01:00
Jack Westbrook
156e160cfa chore(decoupled-plugins): bump rspack to 1.2.0-beta.0 2025-02-18 10:17:19 +01:00
Jack Westbrook
8d03ea95af chore(decoupled-plugins): update rspack to 1.1.5 2025-02-18 10:17:17 +01:00
Jack Westbrook
5174fd803e Wip 2025-02-18 10:16:58 +01:00
Jack Westbrook
79f13e6280 chore(azuremonitor): fix broken dev script 2025-02-18 10:16:58 +01:00
Jack Westbrook
7166eb8fc4 feat(e2e-test-plugins): migrate plugins to use rspack 2025-02-18 10:16:58 +01:00
Jack Westbrook
b9392dd8a9 build(plugin-configs): add imports-loader to dependencies and require.resolve it 2025-02-18 10:16:57 +01:00
Jack Westbrook
3dfd0b923c chore(mysql): remove redundant rspack dep 2025-02-18 10:16:57 +01:00
Jack Westbrook
3b850fa1df feat(zipkin): migrate to rspack 2025-02-18 10:16:57 +01:00
Jack Westbrook
ed879eef40 feat(tempo): migrate to rspack 2025-02-18 10:16:57 +01:00
Jack Westbrook
eafb09b302 feat(parca): migrate to rspack 2025-02-18 10:16:56 +01:00
Jack Westbrook
e955b3c864 feat(mssql): migrate to rspack 2025-02-18 10:16:56 +01:00
Jack Westbrook
ecaba8b054 feat(jaeger): migrate to rspack 2025-02-18 10:16:56 +01:00
Jack Westbrook
e764556aba feat(testdata): migrate to rspack 2025-02-18 10:16:56 +01:00
Jack Westbrook
6c31fe645c feat(pyroscope): migrate to rspack 2025-02-18 10:16:55 +01:00
Jack Westbrook
0402709e68 feat(postgresql): migrate to rspack 2025-02-18 10:16:55 +01:00
Jack Westbrook
a301c22e2b feat(cloud-monitoring): migrate to rspack 2025-02-18 10:16:55 +01:00
Jack Westbrook
f90c4b9cad feat(azuremonitor): migrate to rspack 2025-02-18 10:16:55 +01:00
Jack Westbrook
f7d1a86122 feat(plugin-configs): put back commit hash to versioning 2025-02-18 10:16:55 +01:00
Jack Westbrook
bbda8c6b6b feat(mssql-datasource): move to use rspack 2025-02-18 10:16:52 +01:00
Jack Westbrook
32af00eff9 feat(plugin-configs): replace webpack with rspack 2025-02-18 10:16:28 +01:00
36 changed files with 898 additions and 281 deletions

View File

@@ -3,8 +3,8 @@
"version": "11.6.0-pre",
"private": true,
"scripts": {
"build": "webpack -c ./webpack.config.ts --env production",
"dev": "webpack -w -c ./webpack.config.ts --env development",
"build": "rspack -c ./rspack.config.ts --env production",
"dev": "rspack -w -c ./rspack.config.ts --env development",
"typecheck": "tsc --noEmit",
"lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx ."
},
@@ -12,6 +12,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@grafana/plugin-configs": "workspace:*",
"@rspack/cli": "1.2.3",
"@types/lodash": "4.17.7",
"@types/node": "22.10.2",
"@types/prismjs": "1.26.4",
@@ -22,7 +23,6 @@
"glob": "10.4.1",
"ts-node": "10.9.2",
"typescript": "5.5.4",
"webpack": "5.95.0",
"webpack-merge": "5.10.0"
},
"engines": {

View File

@@ -0,0 +1,36 @@
import rspack from '@rspack/core';
import grafanaConfig from '@grafana/plugin-configs/rspack.config';
import { mergeWithCustomize, unique } from 'webpack-merge';
import { Configuration } from 'webpack';
const config = async (env: Record<string, unknown>): Promise<Configuration> => {
const baseConfig = await grafanaConfig(env);
const customConfig = {
plugins: [
new rspack.CopyRspackPlugin({
patterns: [
// To `compiler.options.output`
{ from: 'README.md', to: '.', force: true },
{ from: 'plugin.json', to: '.' },
{ from: 'CHANGELOG.md', to: '.', force: true },
{
from: '**/*.json',
to: '.',
globOptions: { ignore: ['**/dist/**', '**/tsconfig.json', '**/package.json', '**/project.json'] },
},
{ from: '**/*.svg', to: '.', noErrorOnMissing: true, globOptions: { ignore: ['**/dist/**'] } }, // Optional
],
}),
],
};
return mergeWithCustomize({
customizeArray: unique(
'plugins',
[rspack.CopyRspackPlugin.name],
(plugin) => plugin.constructor && plugin.constructor.name
),
})(baseConfig, customConfig);
};
export default config;

View File

@@ -1,44 +0,0 @@
import CopyWebpackPlugin from 'copy-webpack-plugin';
import grafanaConfig from '@grafana/plugin-configs/webpack.config';
import { mergeWithCustomize, unique } from 'webpack-merge';
import { Configuration } from 'webpack';
function skipFiles(f: string): boolean {
if (f.includes('/dist/')) {
// avoid copying files already in dist
return false;
}
if (f.includes('/node_modules/')) {
// avoid copying tsconfig.json
return false;
}
if (f.includes('/package.json')) {
// avoid copying package.json
return false;
}
return true;
}
const config = async (env: Record<string, unknown>): Promise<Configuration> => {
const baseConfig = await grafanaConfig(env);
const customConfig = {
plugins: [
new CopyWebpackPlugin({
patterns: [
// To `compiler.options.output`
{ from: 'README.md', to: '.', force: true },
{ from: 'plugin.json', to: '.' },
{ from: 'CHANGELOG.md', to: '.', force: true },
{ from: '**/*.json', to: '.', filter: skipFiles },
{ from: '**/*.svg', to: '.', noErrorOnMissing: true, filter: skipFiles }, // Optional
],
}),
],
};
return mergeWithCustomize({
customizeArray: unique('plugins', ['CopyPlugin'], (plugin) => plugin.constructor && plugin.constructor.name),
})(baseConfig, customConfig);
};
export default config;

View File

@@ -3,8 +3,8 @@
"version": "11.6.0-pre",
"private": true,
"scripts": {
"build": "webpack -c ./webpack.config.ts --env production",
"dev": "webpack -w -c ./webpack.config.ts --env development",
"build": "rspack -c ./rspack.config.ts --env production",
"dev": "rspack -w -c ./rspack.config.ts --env development",
"typecheck": "tsc --noEmit",
"lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx ."
},
@@ -12,6 +12,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@grafana/plugin-configs": "workspace:*",
"@rspack/cli": "1.2.3",
"@types/lodash": "4.17.7",
"@types/node": "22.10.2",
"@types/prismjs": "1.26.4",
@@ -22,7 +23,6 @@
"glob": "10.4.1",
"ts-node": "10.9.2",
"typescript": "5.5.4",
"webpack": "5.95.0",
"webpack-merge": "5.10.0"
},
"engines": {

View File

@@ -0,0 +1,36 @@
import rspack from '@rspack/core';
import grafanaConfig from '@grafana/plugin-configs/rspack.config';
import { mergeWithCustomize, unique } from 'webpack-merge';
import { Configuration } from 'webpack';
const config = async (env: Record<string, unknown>): Promise<Configuration> => {
const baseConfig = await grafanaConfig(env);
const customConfig = {
plugins: [
new rspack.CopyRspackPlugin({
patterns: [
// To `compiler.options.output`
{ from: 'README.md', to: '.', force: true },
{ from: 'plugin.json', to: '.' },
{ from: 'CHANGELOG.md', to: '.', force: true },
{
from: '**/*.json',
to: '.',
globOptions: { ignore: ['**/dist/**', '**/tsconfig.json', '**/package.json', '**/project.json'] },
},
{ from: '**/*.svg', to: '.', noErrorOnMissing: true, globOptions: { ignore: ['**/dist/**'] } }, // Optional
],
}),
],
};
return mergeWithCustomize({
customizeArray: unique(
'plugins',
[rspack.CopyRspackPlugin.name],
(plugin) => plugin.constructor && plugin.constructor.name
),
})(baseConfig, customConfig);
};
export default config;

View File

@@ -1,44 +0,0 @@
import CopyWebpackPlugin from 'copy-webpack-plugin';
import grafanaConfig from '@grafana/plugin-configs/webpack.config';
import { mergeWithCustomize, unique } from 'webpack-merge';
import { Configuration } from 'webpack';
function skipFiles(f: string): boolean {
if (f.includes('/dist/')) {
// avoid copying files already in dist
return false;
}
if (f.includes('/node_modules/')) {
// avoid copying tsconfig.json
return false;
}
if (f.includes('/package.json')) {
// avoid copying package.json
return false;
}
return true;
}
const config = async (env: Record<string, unknown>): Promise<Configuration> => {
const baseConfig = await grafanaConfig(env);
const customConfig = {
plugins: [
new CopyWebpackPlugin({
patterns: [
// To `compiler.options.output`
{ from: 'README.md', to: '.', force: true },
{ from: 'plugin.json', to: '.' },
{ from: 'CHANGELOG.md', to: '.', force: true },
{ from: '**/*.json', to: '.', filter: skipFiles },
{ from: '**/*.svg', to: '.', noErrorOnMissing: true, filter: skipFiles }, // Optional
],
}),
],
};
return mergeWithCustomize({
customizeArray: unique('plugins', ['CopyPlugin'], (plugin) => plugin.constructor && plugin.constructor.name),
})(baseConfig, customConfig);
};
export default config;

View File

@@ -8,19 +8,19 @@
},
"devDependencies": {
"@grafana/tsconfig": "^2.0.0",
"@rspack/cli": "1.2.3",
"@rspack/core": "1.2.3",
"@swc/core": "1.10.12",
"@types/eslint": "9.6.1",
"@types/webpack-bundle-analyzer": "^4.7.0",
"copy-webpack-plugin": "12.0.2",
"eslint": "9.19.0",
"eslint-webpack-plugin": "4.2.0",
"fork-ts-checker-webpack-plugin": "9.0.2",
"glob": "11.0.1",
"imports-loader": "^5.0.0",
"replace-in-file-webpack-plugin": "1.0.6",
"swc-loader": "0.2.6",
"rspack-plugin-virtual-module": "^0.1.13",
"typescript": "5.7.3",
"webpack": "5.97.1",
"webpack-bundle-analyzer": "^4.10.2"
"webpack": "5.97.1"
},
"packageManager": "yarn@4.6.0"
}

View File

@@ -0,0 +1,262 @@
/*
* ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️
*
* In order to extend the configuration follow the steps in
* https://grafana.com/developers/plugin-tools/get-started/set-up-development-environment#extend-the-webpack-config
*/
import rspack, { type Configuration } from '@rspack/core';
import ESLintPlugin from 'eslint-webpack-plugin';
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import path from 'path';
// @ts-ignore
import ReplaceInFileWebpackPlugin from 'replace-in-file-webpack-plugin';
import { RspackVirtualModulePlugin } from 'rspack-plugin-virtual-module';
import { DIST_DIR } from './constants';
import { getEntries, getPackageJson, getPluginJson, hasLicense } from './utils';
const pluginJson = getPluginJson();
const virtualPublicPath = new RspackVirtualModulePlugin({
'grafana-public-path': `
import amdMetaModule from 'amd-module';
__webpack_public_path__ =
amdMetaModule && amdMetaModule.uri
? amdMetaModule.uri.slice(0, amdMetaModule.uri.lastIndexOf('/') + 1)
: 'public/plugins/${pluginJson.id}/';
`,
});
const config = async (env: Record<string, unknown>): Promise<Configuration> => {
const baseConfig: Configuration = {
amd: {},
context: process.cwd(),
devtool: 'source-map',
entry: await getEntries(),
externals: [
// Required for dynamic publicPath resolution
{ 'amd-module': 'module' },
'lodash',
'jquery',
'moment',
'slate',
'emotion',
'@emotion/react',
'@emotion/css',
'prismjs',
'slate-plain-serializer',
'@grafana/slate-react',
'react',
'react-dom',
'react-redux',
'redux',
'rxjs',
'react-router',
'd3',
'angular',
'@grafana/ui',
'@grafana/runtime',
'@grafana/data',
// Mark legacy SDK imports as external if their name starts with the "grafana/" prefix
({ request }, callback) => {
const prefix = 'grafana/';
const hasPrefix = (request?: string) => request?.indexOf(prefix) === 0;
const stripPrefix = (request?: string) => request?.substr(prefix.length);
if (hasPrefix(request)) {
return callback(undefined, stripPrefix(request));
}
callback();
},
],
// Support WebAssembly according to latest spec - makes WebAssembly module async
experiments: {
asyncWebAssembly: true,
},
mode: env.production ? 'production' : 'development',
module: {
rules: [
// This must come first in the rules array otherwise it breaks sourcemaps.
{
test: /src\/(?:.*\/)?module\.tsx?$/,
use: [
{
loader: require.resolve('imports-loader'),
options: {
imports: `side-effects grafana-public-path`,
},
},
],
},
// HACKS: Workaround for rspack not outputting UMD modules as webpack does.
// We have systemjs amd define which doesn't work like standard amd define so we need to disable it,
// in any umd module otherwise it will break at runtime.
// {
// test: [require.resolve('json-logic-js'), require.resolve('classnames')],
// use: [
// {
// loader: require.resolve('imports-loader'),
// options: {
// additionalCode: 'var define = false; /* Disable AMD for misbehaving libraries */',
// },
// },
// ],
// },
{
exclude: /(node_modules)/,
test: /\.[tj]sx?$/,
use: {
loader: 'builtin:swc-loader',
options: {
jsc: {
externalHelpers: true,
loose: false,
parser: {
syntax: 'typescript',
tsx: true,
},
transform: {
react: {
development: !env.production,
refresh: false,
runtime: 'automatic',
},
},
},
env: {
target: 'es2020',
},
},
},
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.s[ac]ss$/,
use: ['style-loader', 'css-loader', 'sass-loader'],
},
{
test: /\.(png|jpe?g|gif|svg)$/,
type: 'asset/resource',
generator: {
filename: Boolean(env.production) ? '[hash][ext]' : '[file]',
},
},
{
test: /\.(woff|woff2|eot|ttf|otf)(\?v=\d+\.\d+\.\d+)?$/,
type: 'asset/resource',
generator: {
filename: Boolean(env.production) ? '[hash][ext]' : '[file]',
},
},
],
},
output: {
clean: true,
filename: '[name].js',
library: {
type: 'amd',
},
path: path.resolve(process.cwd(), DIST_DIR),
publicPath: `public/plugins/${pluginJson.id}/`,
uniqueName: pluginJson.id,
},
plugins: [
virtualPublicPath,
new rspack.CopyRspackPlugin({
patterns: [
// If src/README.md exists use it; otherwise the root README
// To `compiler.options.output`
{ from: 'README.md', to: '.', force: true },
{ from: 'plugin.json', to: '.' },
{ from: hasLicense() ? 'LICENSE' : '../../../../../LICENSE', to: '.' }, // Point to Grafana License by default
{ from: 'CHANGELOG.md', to: '.', force: true },
{
from: '**/*.json',
to: '.',
globOptions: { ignore: ['**/dist/**', '**/tsconfig.json', '**/package.json', '**/project.json'] },
}, // Optional
{ from: '**/*.svg', to: '.', noErrorOnMissing: true, globOptions: { ignore: ['**/dist/**'] } }, // Optional
{ from: '**/*.png', to: '.', noErrorOnMissing: true, globOptions: { ignore: ['**/dist/**'] } }, // Optional
{ from: '**/*.html', to: '.', noErrorOnMissing: true, globOptions: { ignore: ['**/dist/**'] } }, // Optional
{ from: 'img/**/*', to: '.', noErrorOnMissing: true, globOptions: { ignore: ['**/dist/**'] } }, // Optional
{ from: 'libs/**/*', to: '.', noErrorOnMissing: true, globOptions: { ignore: ['**/dist/**'] } }, // Optional
{ from: 'static/**/*', to: '.', noErrorOnMissing: true, globOptions: { ignore: ['**/dist/**'] } }, // Optional
{ from: '**/query_help.md', to: '.', noErrorOnMissing: true, globOptions: { ignore: ['**/dist/**'] } }, // Optional
],
}),
// Replace certain template-variables in the README and plugin.json
new ReplaceInFileWebpackPlugin([
{
dir: DIST_DIR,
files: ['plugin.json', 'README.md'],
rules: [
{
search: /\%VERSION\%/g,
replace: env.commit ? `${getPackageJson().version}-${env.commit}` : getPackageJson().version,
},
{
search: /\%TODAY\%/g,
replace: new Date().toISOString().substring(0, 10),
},
{
search: /\%PLUGIN_ID\%/g,
replace: pluginJson.id,
},
],
},
]),
...(env.development
? [
new ForkTsCheckerWebpackPlugin({
async: Boolean(env.development),
issue: {
include: [{ file: '**/*.{ts,tsx}' }],
},
typescript: { configFile: path.join(process.cwd(), 'tsconfig.json') },
}),
new ESLintPlugin({
extensions: ['.ts', '.tsx'],
lintDirtyModulesOnly: true, // don't lint on start, only lint changed files
cacheLocation: path.resolve(
__dirname,
'../../node_modules/.cache/eslint-webpack-plugin',
path.basename(process.cwd()),
'.eslintcache'
),
}),
]
: []),
],
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx'],
// handle resolving "rootDir" paths
modules: [path.resolve(process.cwd(), 'src'), 'node_modules'],
},
stats: env.production ? 'normal' : 'minimal',
watchOptions: {
ignored: ['**/node_modules', '**/dist', '**/.yarn'],
},
};
return baseConfig;
};
export default config;

View File

@@ -27,6 +27,7 @@
"devDependencies": {
"@grafana/e2e-selectors": "11.6.0-pre",
"@grafana/plugin-configs": "11.6.0-pre",
"@rspack/cli": "1.2.3",
"@testing-library/dom": "10.4.0",
"@testing-library/jest-dom": "6.6.3",
"@testing-library/react": "16.2.0",
@@ -46,9 +47,9 @@
"@grafana/runtime": "*"
},
"scripts": {
"build": "webpack -c ./webpack.config.ts --env production",
"build:commit": "webpack -c ./webpack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "webpack -w -c ./webpack.config.ts --env development"
"build": "rspack -c ./rspack.config.ts --env production",
"build:commit": "rspack -c ./rspack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "rspack -w -c rspack.config.ts --env development"
},
"packageManager": "yarn@4.6.0"
}

View File

@@ -1,7 +1,7 @@
import type { Configuration } from 'webpack';
import type { Configuration } from '@rspack/core';
import { merge } from 'webpack-merge';
import grafanaConfig from '@grafana/plugin-configs/webpack.config';
import grafanaConfig from '@grafana/plugin-configs/rspack.config';
const config = async (env: Record<string, unknown>): Promise<Configuration> => {
const baseConfig = await grafanaConfig(env);
@@ -11,4 +11,5 @@ const config = async (env: Record<string, unknown>): Promise<Configuration> => {
});
};
// eslint-disable-next-line no-barrel-files/no-barrel-files
export default config;

View File

@@ -28,6 +28,7 @@
"devDependencies": {
"@grafana/e2e-selectors": "11.6.0-pre",
"@grafana/plugin-configs": "11.6.0-pre",
"@rspack/cli": "1.2.3",
"@testing-library/dom": "10.4.0",
"@testing-library/jest-dom": "6.6.3",
"@testing-library/react": "16.2.0",
@@ -41,16 +42,15 @@
"@types/react-dom": "18.3.5",
"react-select-event": "5.5.1",
"ts-node": "10.9.2",
"typescript": "5.7.3",
"webpack": "5.97.1"
"typescript": "5.7.3"
},
"peerDependencies": {
"@grafana/runtime": "*"
},
"scripts": {
"build": "webpack -c ./webpack.config.ts --env production",
"build:commit": "webpack -c ./webpack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "webpack -w -c ./webpack.config.ts --env development"
"build": "rspack -c ./rspack.config.ts --env production",
"build:commit": "rspack -c ./rspack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "rspack -w -c ./rspack.config.ts --env development"
},
"packageManager": "yarn@4.6.0"
}

View File

@@ -1,4 +1,4 @@
import config from '@grafana/plugin-configs/webpack.config';
import config from '@grafana/plugin-configs/rspack.config';
// eslint-disable-next-line no-barrel-files/no-barrel-files
export default config;

View File

@@ -1,3 +0,0 @@
import config from '@grafana/plugin-configs/webpack.config';
export default config;

View File

@@ -18,6 +18,7 @@
"devDependencies": {
"@grafana/e2e-selectors": "11.6.0-pre",
"@grafana/plugin-configs": "11.6.0-pre",
"@rspack/cli": "1.2.3",
"@testing-library/dom": "10.4.0",
"@testing-library/react": "16.2.0",
"@testing-library/user-event": "14.6.1",
@@ -26,16 +27,15 @@
"@types/node": "22.12.0",
"@types/react": "18.3.18",
"ts-node": "10.9.2",
"typescript": "5.7.3",
"webpack": "5.97.1"
"typescript": "5.7.3"
},
"peerDependencies": {
"@grafana/runtime": "*"
},
"scripts": {
"build": "webpack -c ./webpack.config.ts --env production",
"build:commit": "webpack -c ./webpack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "webpack -w -c ./webpack.config.ts --env development"
"build": "rspack -c ./rspack.config.ts --env production",
"build:commit": "rspack -c ./rspack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "rspack -w -c ./rspack.config.ts --env development"
},
"packageManager": "yarn@4.6.0"
}

View File

@@ -1,4 +1,4 @@
import config from '@grafana/plugin-configs/webpack.config';
import config from '@grafana/plugin-configs/rspack.config';
// eslint-disable-next-line no-barrel-files/no-barrel-files
export default config;

View File

@@ -21,6 +21,7 @@
},
"devDependencies": {
"@grafana/plugin-configs": "11.6.0-pre",
"@rspack/cli": "1.2.3",
"@testing-library/dom": "10.4.0",
"@testing-library/jest-dom": "6.6.3",
"@testing-library/react": "16.2.0",
@@ -35,16 +36,15 @@
"jest": "29.7.0",
"style-loader": "4.0.0",
"ts-node": "10.9.2",
"typescript": "5.7.3",
"webpack": "5.97.1"
"typescript": "5.7.3"
},
"peerDependencies": {
"@grafana/runtime": "*"
},
"scripts": {
"build": "webpack -c ./webpack.config.ts --env production",
"build:commit": "webpack -c ./webpack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "webpack -w -c ./webpack.config.ts --env development"
"build": "rspack -c ./rspack.config.ts --env production",
"build:commit": "rspack -c ./rspack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "rspack -w -c ./rspack.config.ts --env development"
},
"packageManager": "yarn@4.6.0"
}

View File

@@ -1,4 +1,4 @@
import config from '@grafana/plugin-configs/webpack.config';
import config from '@grafana/plugin-configs/rspack.config';
const configWithFallback = async (env: Record<string, unknown>) => {
const response = await config(env);

View File

@@ -23,6 +23,7 @@
"devDependencies": {
"@grafana/e2e-selectors": "11.6.0-pre",
"@grafana/plugin-configs": "11.6.0-pre",
"@rspack/cli": "1.2.3",
"@testing-library/dom": "10.4.0",
"@testing-library/react": "16.2.0",
"@testing-library/user-event": "14.6.1",
@@ -34,16 +35,15 @@
"@types/react-dom": "18.3.5",
"@types/uuid": "10.0.0",
"ts-node": "10.9.2",
"typescript": "5.7.3",
"webpack": "5.97.1"
"typescript": "5.7.3"
},
"peerDependencies": {
"@grafana/runtime": "*"
},
"scripts": {
"build": "webpack -c ./webpack.config.ts --env production",
"build:commit": "webpack -c ./webpack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "webpack -w -c ./webpack.config.ts --env development"
"build": "rspack -c ./rspack.config.ts --env production",
"build:commit": "rspack -c ./rspack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "rspack -w -c ./rspack.config.ts --env development"
},
"packageManager": "yarn@4.6.0"
}

View File

@@ -1,4 +1,4 @@
import config from '@grafana/plugin-configs/webpack.config';
import config from '@grafana/plugin-configs/rspack.config';
// eslint-disable-next-line no-barrel-files/no-barrel-files
export default config;

View File

@@ -1,3 +0,0 @@
import config from '@grafana/plugin-configs/webpack.config';
export default config;

View File

@@ -24,6 +24,7 @@
},
"devDependencies": {
"@grafana/plugin-configs": "workspace:*",
"@rspack/cli": "1.2.3",
"@testing-library/dom": "10.4.0",
"@testing-library/jest-dom": "6.6.3",
"@testing-library/react": "16.2.0",
@@ -44,9 +45,9 @@
"@grafana/runtime": "*"
},
"scripts": {
"build": "webpack -c ./webpack.config.ts --env production",
"build:commit": "webpack -c ./webpack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "webpack -w -c ./webpack.config.ts --env development"
"build": "rspack -c ./rspack.config.ts --env production",
"build:commit": "rspack -c ./rspack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "rspack -w -c ./rspack.config.ts --env development"
},
"packageManager": "yarn@4.6.0"
}

View File

@@ -1,4 +1,4 @@
import config from '@grafana/plugin-configs/webpack.config';
import config from '@grafana/plugin-configs/rspack.config';
const configWithFallback = async (env: Record<string, unknown>) => {
const response = await config(env);
@@ -11,4 +11,5 @@ const configWithFallback = async (env: Record<string, unknown>) => {
return response;
};
// eslint-disable-next-line no-barrel-files/no-barrel-files
export default configWithFallback;

View File

@@ -18,6 +18,7 @@
"devDependencies": {
"@grafana/e2e-selectors": "11.6.0-pre",
"@grafana/plugin-configs": "11.6.0-pre",
"@rspack/cli": "1.2.3",
"@testing-library/dom": "10.4.0",
"@testing-library/react": "16.2.0",
"@testing-library/user-event": "14.6.1",
@@ -26,16 +27,15 @@
"@types/node": "22.12.0",
"@types/react": "18.3.18",
"ts-node": "10.9.2",
"typescript": "5.7.3",
"webpack": "5.97.1"
"typescript": "5.7.3"
},
"peerDependencies": {
"@grafana/runtime": "*"
},
"scripts": {
"build": "webpack -c ./webpack.config.ts --env production",
"build:commit": "webpack -c ./webpack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "webpack -w -c ./webpack.config.ts --env development"
"build": "rspack -c ./rspack.config.ts --env production",
"build:commit": "rspack -c ./rspack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "rspack -w -c ./rspack.config.ts --env development"
},
"packageManager": "yarn@4.6.0"
}

View File

@@ -0,0 +1,4 @@
import config from '@grafana/plugin-configs/rspack.config';
// eslint-disable-next-line no-barrel-files/no-barrel-files
export default config;

View File

@@ -18,6 +18,7 @@
"devDependencies": {
"@grafana/e2e-selectors": "11.6.0-pre",
"@grafana/plugin-configs": "11.6.0-pre",
"@rspack/cli": "1.2.3",
"@testing-library/dom": "10.4.0",
"@testing-library/react": "16.2.0",
"@testing-library/user-event": "14.6.1",
@@ -26,16 +27,15 @@
"@types/node": "22.12.0",
"@types/react": "18.3.18",
"ts-node": "10.9.2",
"typescript": "5.7.3",
"webpack": "5.97.1"
"typescript": "5.7.3"
},
"peerDependencies": {
"@grafana/runtime": "*"
},
"scripts": {
"build": "webpack -c ./webpack.config.ts --env production",
"build:commit": "webpack -c ./webpack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "webpack -w -c ./webpack.config.ts --env development"
"build": "rspack -c ./rspack.config.ts --env production",
"build:commit": "rspack -c ./rspack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "rspack -w -c ./rspack.config.ts --env development"
},
"packageManager": "yarn@4.6.0"
}

View File

@@ -0,0 +1,4 @@
import config from '@grafana/plugin-configs/rspack.config';
// eslint-disable-next-line no-barrel-files/no-barrel-files
export default config;

View File

@@ -19,6 +19,7 @@
},
"devDependencies": {
"@grafana/plugin-configs": "11.6.0-pre",
"@rspack/cli": "1.2.3",
"@testing-library/dom": "10.4.0",
"@testing-library/react": "16.2.0",
"@testing-library/user-event": "14.6.1",
@@ -27,16 +28,15 @@
"@types/react": "18.3.18",
"@types/react-dom": "18.3.5",
"ts-node": "10.9.2",
"typescript": "5.7.3",
"webpack": "5.97.1"
"typescript": "5.7.3"
},
"peerDependencies": {
"@grafana/runtime": "*"
},
"scripts": {
"build": "webpack -c ./webpack.config.ts --env production",
"build:commit": "webpack -c ./webpack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "webpack -w -c ./webpack.config.ts --env development"
"build": "rspack -c ./rspack.config.ts --env production",
"build:commit": "rspack -c ./rspack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "rspack -w -c ./rspack.config.ts --env development"
},
"packageManager": "yarn@4.6.0"
}

View File

@@ -0,0 +1,4 @@
import config from '@grafana/plugin-configs/rspack.config';
// eslint-disable-next-line no-barrel-files/no-barrel-files
export default config;

View File

@@ -1,3 +0,0 @@
import config from '@grafana/plugin-configs/webpack.config';
export default config;

View File

@@ -40,6 +40,7 @@
},
"devDependencies": {
"@grafana/plugin-configs": "11.6.0-pre",
"@rspack/cli": "1.2.3",
"@testing-library/dom": "10.4.0",
"@testing-library/jest-dom": "6.6.3",
"@testing-library/react": "16.2.0",
@@ -55,17 +56,16 @@
"glob": "11.0.1",
"react-select-event": "5.5.1",
"ts-node": "10.9.2",
"typescript": "5.7.3",
"webpack": "5.97.1"
"typescript": "5.7.3"
},
"peerDependencies": {
"@grafana/runtime": "*"
},
"scripts": {
"build": "webpack -c ./webpack.config.ts --env production",
"build": "rspack -c ./rspack.config.ts --env production",
"build:stats": "yarn build --env stats --profile --json=compilation-stats.json",
"build:commit": "webpack -c ./webpack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "webpack -w -c ./webpack.config.ts --env development"
"build:commit": "rspack -c ./rspack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "rspack -w -c ./rspack.config.ts --env development"
},
"packageManager": "yarn@4.6.0"
}

View File

@@ -0,0 +1,4 @@
import config from '@grafana/plugin-configs/rspack.config';
// eslint-disable-next-line no-barrel-files/no-barrel-files
export default config;

View File

@@ -1,3 +0,0 @@
import config from '@grafana/plugin-configs/webpack.config';
export default config;

View File

@@ -21,6 +21,7 @@
},
"devDependencies": {
"@grafana/plugin-configs": "workspace:*",
"@rspack/cli": "1.2.3",
"@testing-library/dom": "10.4.0",
"@testing-library/jest-dom": "6.6.3",
"@testing-library/react": "16.2.0",
@@ -30,16 +31,15 @@
"@types/react": "18.3.18",
"@types/react-dom": "18.3.5",
"ts-node": "10.9.2",
"typescript": "5.7.3",
"webpack": "5.97.1"
"typescript": "5.7.3"
},
"peerDependencies": {
"@grafana/runtime": "*"
},
"scripts": {
"build": "webpack -c ./webpack.config.ts --env production",
"build:commit": "webpack -c ./webpack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "webpack -w -c ./webpack.config.ts --env development"
"build": "rspack -c ./rspack.config.ts --env production",
"build:commit": "rspack -c ./rspack.config.ts --env production --env commit=$(git rev-parse --short HEAD)",
"dev": "rspack -w -c ./rspack.config.ts --env development"
},
"packageManager": "yarn@4.6.0"
}

View File

@@ -0,0 +1,4 @@
import config from '@grafana/plugin-configs/rspack.config';
// eslint-disable-next-line no-barrel-files/no-barrel-files
export default config;

View File

@@ -1,3 +0,0 @@
import config from '@grafana/plugin-configs/webpack.config';
export default config;

580
yarn.lock

File diff suppressed because it is too large Load Diff