sadpandajoe commented on code in PR #44965:
URL: https://github.com/apache/superset/pull/44965#discussion_r4178026975
##########
superset-frontend/webpack.config.js:
##########
@@ -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',
Review Comment:
Native copying treats `to` as a directory, so these patterns emit
`maplibre-gl-worker.mjs/maplibre-gl-worker.mjs` and
`maplibre-gl-shared.mjs/maplibre-gl-shared.mjs`; Point Cluster Map still
requests the flat worker URL, and the two modules are no longer siblings.
Should both file patterns omit `to` so their existing basenames are emitted
directly under the asset root?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]