From f90c4b9cad24484b36eb8e7de7dc5162d591d63b Mon Sep 17 00:00:00 2001 From: Jack Westbrook Date: Sun, 10 Nov 2024 12:24:36 +0100 Subject: [PATCH] feat(azuremonitor): migrate to rspack --- public/app/plugins/datasource/azuremonitor/package.json | 8 +++++--- .../azuremonitor/{webpack.config.ts => rspack.config.ts} | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) rename public/app/plugins/datasource/azuremonitor/{webpack.config.ts => rspack.config.ts} (60%) diff --git a/public/app/plugins/datasource/azuremonitor/package.json b/public/app/plugins/datasource/azuremonitor/package.json index 854abbb71e0..2163a09edc9 100644 --- a/public/app/plugins/datasource/azuremonitor/package.json +++ b/public/app/plugins/datasource/azuremonitor/package.json @@ -27,6 +27,8 @@ "devDependencies": { "@grafana/e2e-selectors": "11.6.0-pre", "@grafana/plugin-configs": "11.6.0-pre", + "@rspack/cli": "^1.0.0", + "@rspack/core": "^1.0.0", "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.6.3", "@testing-library/react": "16.2.0", @@ -46,9 +48,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 rspackwebpack.config.ts --env development" }, "packageManager": "yarn@4.6.0" } diff --git a/public/app/plugins/datasource/azuremonitor/webpack.config.ts b/public/app/plugins/datasource/azuremonitor/rspack.config.ts similarity index 60% rename from public/app/plugins/datasource/azuremonitor/webpack.config.ts rename to public/app/plugins/datasource/azuremonitor/rspack.config.ts index 6457f58a1d2..f7c4e5b008a 100644 --- a/public/app/plugins/datasource/azuremonitor/webpack.config.ts +++ b/public/app/plugins/datasource/azuremonitor/rspack.config.ts @@ -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): Promise => { const baseConfig = await grafanaConfig(env); @@ -11,4 +11,5 @@ const config = async (env: Record): Promise => { }); }; +// eslint-disable-next-line no-barrel-files/no-barrel-files export default config;