You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ha...@apache.org on 2026/10/04 13:46:31 UTC
(superset) 01/01: chore(build): migrate from external `copy-webpack-plugin` to Webpack-native `output.css`
This is an automated email from the ASF dual-hosted git repository.
hainenber pushed a commit to branch migrate-from-deprecated-copy-webpack-plugin
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 19d7099742415c4c9aa515b724a6f56743dfe77c
Author: hainenber <do...@gmail.com>
AuthorDate: Sun Oct 4 20:46:10 2026 +0700
chore(build): migrate from external `copy-webpack-plugin` to Webpack-native `output.css`
Signed-off-by: hainenber <do...@gmail.com>
---
superset-frontend/package-lock.json | 48 -------------------------------------
superset-frontend/package.json | 1 -
superset-frontend/webpack.config.js | 38 +++++++++++++----------------
3 files changed, 17 insertions(+), 70 deletions(-)
diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json
index 82fd1e21a6e..49ab97e9081 100644
--- a/superset-frontend/package-lock.json
+++ b/superset-frontend/package-lock.json
@@ -218,7 +218,6 @@
"baseline-browser-mapping": "^2.11.26",
"cheerio": "1.2.0",
"concurrently": "^10.0.5",
- "copy-webpack-plugin": "^14.0.0",
"cross-env": "^10.1.0",
"css-loader": "^7.1.5",
"eslint": "^10.10.0",
@@ -19620,43 +19619,6 @@
"toggle-selection": "^1.0.6"
}
},
- "node_modules/copy-webpack-plugin": {
- "version": "14.0.0",
- "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-14.0.0.tgz",
- "integrity": "sha512-3JLW90aBGeaTLpM7mYQKpnVdgsUZRExY55giiZgLuX/xTQRUs1dOCwbBnWnvY6Q6rfZoXMNwzOQJCSZPppfqXA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "glob-parent": "^6.0.1",
- "normalize-path": "^3.0.0",
- "schema-utils": "^4.2.0",
- "serialize-javascript": "^7.0.3",
- "tinyglobby": "^0.2.12"
- },
- "engines": {
- "node": ">= 20.9.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- },
- "peerDependencies": {
- "webpack": "^5.1.0"
- }
- },
- "node_modules/copy-webpack-plugin/node_modules/glob-parent": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
- "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "is-glob": "^4.0.3"
- },
- "engines": {
- "node": ">=10.13.0"
- }
- },
"node_modules/core-assert": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/core-assert/-/core-assert-0.2.1.tgz",
@@ -40468,16 +40430,6 @@
"url": "https://opencollective.com/express"
}
},
- "node_modules/serialize-javascript": {
- "version": "7.0.5",
- "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.0.5.tgz",
- "integrity": "sha512-F4LcB0UqUl1zErq+1nYEEzSHJnIwb3AF2XWB94b+afhrekOUijwooAYqFyRbjYkm2PAKBabx6oYv/xDxNi8IBw==",
- "dev": true,
- "license": "BSD-3-Clause",
- "engines": {
- "node": ">=20.0.0"
- }
- },
"node_modules/serialize-query-params": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/serialize-query-params/-/serialize-query-params-2.0.4.tgz",
diff --git a/superset-frontend/package.json b/superset-frontend/package.json
index 82c25e9585f..61c5541ff19 100644
--- a/superset-frontend/package.json
+++ b/superset-frontend/package.json
@@ -295,7 +295,6 @@
"baseline-browser-mapping": "^2.11.26",
"cheerio": "1.2.0",
"concurrently": "^10.0.5",
- "copy-webpack-plugin": "^14.0.0",
"cross-env": "^10.1.0",
"css-loader": "^7.1.5",
"eslint": "^10.10.0",
diff --git a/superset-frontend/webpack.config.js b/superset-frontend/webpack.config.js
index 60f4be9a5d2..bac050f9e4c 100644
--- a/superset-frontend/webpack.config.js
+++ b/superset-frontend/webpack.config.js
@@ -23,7 +23,6 @@ import { createRequire } from 'node:module';
import { fileURLToPath } from 'node:url';
import webpack from 'webpack';
import * as webpackBundleAnalyzer from 'webpack-bundle-analyzer';
-import CopyPlugin from 'copy-webpack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
import MinimizerPlugin from 'minimizer-webpack-plugin';
@@ -107,6 +106,23 @@ const output = {
pathData.chunk?.name === 'service-worker'
? '../service-worker.js'
: defaultChunkFilename,
+ copy: [
+ 'package.json',
+ { from: 'src/assets/images', to: 'images' },
+ // maplibre-gl 6's ESM-only build loads its worker from a real URL
+ // instead of an inlined blob (see MapLibre.tsx for the matching
+ // maplibregl.setWorkerUrl() call). The worker's own bundle does a
+ // relative ESM import of its "shared" chunk, so both files must be
+ // copied verbatim, unhashed, into the same output directory.
+ {
+ from: 'node_modules/maplibre-gl/dist/maplibre-gl-worker.mjs',
+ to: 'maplibre-gl-worker.mjs',
+ },
+ {
+ from: 'node_modules/maplibre-gl/dist/maplibre-gl-shared.mjs',
+ to: 'maplibre-gl-shared.mjs',
+ },
+ ],
};
if (!isDevMode) {
@@ -161,26 +177,6 @@ const plugins = [
'process.env.SCARF_ANALYTICS': JSON.stringify(process.env.SCARF_ANALYTICS),
}),
- new CopyPlugin({
- patterns: [
- 'package.json',
- { from: 'src/assets/images', to: 'images' },
- // maplibre-gl 6's ESM-only build loads its worker from a real URL
- // instead of an inlined blob (see MapLibre.tsx for the matching
- // maplibregl.setWorkerUrl() call). The worker's own bundle does a
- // relative ESM import of its "shared" chunk, so both files must be
- // copied verbatim, unhashed, into the same output directory.
- {
- from: 'node_modules/maplibre-gl/dist/maplibre-gl-worker.mjs',
- to: 'maplibre-gl-worker.mjs',
- },
- {
- from: 'node_modules/maplibre-gl/dist/maplibre-gl-shared.mjs',
- to: 'maplibre-gl-shared.mjs',
- },
- ],
- }),
-
// static pages
new HtmlWebpackPlugin({
template: './src/assets/staticPages/404.html',