Skip to content

Commit 4534014

Browse files
committed
Remove import.meta?.url polyfill
1 parent c82b0c9 commit 4534014

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

build/rollup.config.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import meta from '../package.json' assert {type: 'json'};
88

99
const ignore_modules = ['fs', 'zlib', 'gl', './base/lzma.mjs', './base/zstd.mjs', '../../scripts/jspdf.es.min.js', '../../scripts/svg2pdf.es.min.js'];
1010

11-
const importMetaUrlPolyfill = `(typeof document === 'undefined' && typeof location === 'undefined' ? undefined : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('jsroot.js', document.baseURI).href));`;
12-
1311
for(let key in meta.dependencies)
1412
ignore_modules.push(key);
1513

@@ -25,9 +23,6 @@ const config = {
2523
banner: `// ${meta.homepage} v${meta.version}`
2624
},
2725
plugins: [
28-
modify({
29-
'import.meta?.url': importMetaUrlPolyfill
30-
}),
3126
ignore(ignore_modules),
3227
nodeResolve(),
3328
json(),
@@ -83,8 +78,7 @@ const config_geom_nothreejs = {
8378
plugins: [
8479
modify({
8580
"from '../three.mjs'": "from 'three'",
86-
"from '../three_addons.mjs'": "from 'three/addons'",
87-
'import.meta?.url': importMetaUrlPolyfill
81+
"from '../three_addons.mjs'": "from 'three/addons'"
8882
}),
8983
ignore(ignore_modules),
9084
nodeResolve(),

0 commit comments

Comments
 (0)