mirror of
https://github.com/ccmdi/obsidian-map-plus.git
synced 2026-07-22 06:43:14 +00:00
chore: 1.1.7
This commit is contained in:
parent
7b8f0ed7df
commit
926c19d8d3
4 changed files with 29 additions and 4 deletions
|
|
@ -11,6 +11,30 @@ if you want to view the source, please visit the github repository of this plugi
|
|||
|
||||
const prod = (process.argv[2] === "production");
|
||||
|
||||
// Strip debug/dynamic script loading utilities from luma.gl and loaders.gl.
|
||||
// These create <script> elements that trigger Obsidian's static analysis scanner.
|
||||
// None are called by this plugin.
|
||||
const stripDynamicScriptsPlugin = {
|
||||
name: "strip-dynamic-scripts",
|
||||
setup(build) {
|
||||
// luma.gl: debug-only SpectorJS / WebGL dev tools loader
|
||||
build.onLoad({ filter: /load-script\.[jt]s$/ }, () => ({
|
||||
contents: "export async function loadScript() { throw new Error('not available'); }",
|
||||
loader: "ts",
|
||||
}));
|
||||
// loaders.gl: dynamic library loader that injects script elements
|
||||
build.onLoad({ filter: /library-utils\.[jt]s$/ }, async (args) => {
|
||||
const fs = await import("fs");
|
||||
let contents = fs.readFileSync(args.path, "utf8");
|
||||
contents = contents.replace(
|
||||
/const script = document\.createElement\(['"]script['"]\);[\s\S]*?document\.body\.appendChild\(script\);\s*return null;/,
|
||||
"return null;",
|
||||
);
|
||||
return { contents, loader: "ts" };
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
const context = await esbuild.context({
|
||||
banner: {
|
||||
js: banner,
|
||||
|
|
@ -37,6 +61,7 @@ const context = await esbuild.context({
|
|||
logLevel: "info",
|
||||
sourcemap: prod ? false : "inline",
|
||||
treeShaking: true,
|
||||
plugins: [stripDynamicScriptsPlugin],
|
||||
outfile: "main.js",
|
||||
minify: prod,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "mapplus",
|
||||
"name": "MapPlus",
|
||||
"version": "1.1.6",
|
||||
"version": "1.1.7",
|
||||
"minAppVersion": "1.10.0",
|
||||
"description": "A performant and customizable map inside Bases.",
|
||||
"author": "ccmdi",
|
||||
|
|
|
|||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "mapplus",
|
||||
"version": "1.1.6",
|
||||
"version": "1.1.7",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "mapplus",
|
||||
"version": "1.1.6",
|
||||
"version": "1.1.7",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@deck.gl/core": "^9.1.15",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mapplus",
|
||||
"version": "1.1.6",
|
||||
"version": "1.1.7",
|
||||
"description": "A performant and customizable map inside Bases",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue