Upgrade to map libre 6
Deploy Spot / deploy (push) Successful in 47s

This commit is contained in:
2026-07-25 23:59:31 +02:00
parent 9a8b95d237
commit fb500f3c34
4 changed files with 258 additions and 618 deletions
+20 -1
View File
@@ -3,6 +3,7 @@ const fs = require('fs');
const webpack = require('webpack');
const SymlinkWebpackPlugin = require('symlink-webpack-plugin');
const { VueLoaderPlugin } = require('vue-loader');
const CopyPlugin = require("copy-webpack-plugin");
const ROOT = path.resolve(__dirname, '..');
const SRC = path.resolve(ROOT, 'src');
@@ -58,6 +59,13 @@ module.exports = (env, argv) => {
rules: [{
test: /\.vue$/,
loader: 'vue-loader'
}, {
test: /\.mjs$/,
include: /node_modules\/maplibre-gl/,
parser: {
exprContextCritical: false, // Silences expression context warnings [2]
unknownContextCritical: false // Silences unknown context warnings
}
}, {
test: /\.js$/,
exclude: file => (/node_modules/.test(file) && !/\.vue\.js/.test(file)),
@@ -94,7 +102,8 @@ module.exports = (env, argv) => {
generator: {
filename: isDev ? 'assets/images/[name][ext]' : 'assets/images/[name].[contenthash:8][ext]'
}
}]
}
]
},
plugins: [
new SymlinkWebpackPlugin([
@@ -102,6 +111,12 @@ module.exports = (env, argv) => {
{ origin: '../resources/geo/', symlink: 'geo' },
{ origin: '../src/images/icons/', symlink: 'assets/images/icons' }
]),
new CopyPlugin({
patterns: [{
from: "node_modules/maplibre-gl/dist/maplibre-gl-(worker|shared).mjs",
to: "maplibre/[name][ext]"
}]
}),
new webpack.DefinePlugin({
__VUE_OPTIONS_API__: 'true',
__VUE_PROD_DEVTOOLS__: 'false',
@@ -134,6 +149,10 @@ module.exports = (env, argv) => {
'@scripts': path.resolve(SRC, 'scripts'),
'@styles': path.resolve(SRC, 'styles')
}
},
stats: {
children: true,
errorDetails: true
}
};
};