fix(map): publish MapLibre worker
This commit is contained in:
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "dhv2-web",
|
"name": "dhv2-web",
|
||||||
"version": "0.23.0-9",
|
"version": "0.23.0-10",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "dhv2-web",
|
"name": "dhv2-web",
|
||||||
"version": "0.23.0-9",
|
"version": "0.23.0-10",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"maplibre-gl": "6.4.1",
|
"maplibre-gl": "6.4.1",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dhv2-web",
|
"name": "dhv2-web",
|
||||||
"version": "0.23.0-9",
|
"version": "0.23.0-10",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "tsc -b && vite build",
|
"build": "tsc -b && vite build && node scripts/copy-maplibre-worker.mjs",
|
||||||
"typecheck": "tsc --noEmit"
|
"typecheck": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { chmodSync, copyFileSync, mkdirSync, statSync } from 'node:fs';
|
||||||
|
import { dirname, resolve } from 'node:path';
|
||||||
|
|
||||||
|
const source = resolve('node_modules/maplibre-gl/dist/maplibre-gl-worker.mjs');
|
||||||
|
const target = resolve('dist/assets/maplibre-gl-worker.mjs');
|
||||||
|
mkdirSync(dirname(target), { recursive: true });
|
||||||
|
copyFileSync(source, target);
|
||||||
|
chmodSync(target, 0o644);
|
||||||
|
const bytes = statSync(target).size;
|
||||||
|
if (bytes < 1000) throw new Error(`MapLibre worker inválido: ${bytes} bytes`);
|
||||||
|
console.log(`MapLibre worker: ${target} (${bytes} bytes)`);
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
export const APP_VERSION = '0.23.0-9';
|
export const APP_VERSION = '0.23.0-10';
|
||||||
export const APP_PHASE = 'F6.12 · Geometrías y correo SMTP';
|
export const APP_PHASE = 'F6.13 · Mapa operativo';
|
||||||
|
|||||||
Reference in New Issue
Block a user