GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — @nativescript/vite: native dev bridge drops ?raw from SVG imports · Issue #11550 · NativeScript/NativeScript Open Labels DescriptionNative dev HTTP-ESM serving loses the Environment
Minimal import shapeIn a NativeScript Vite app, add an SVG and import it as text from an entry-reachable module: <!-- src/icon.svg --> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1"><path d="M0 0h1v1H0z"/></svg> // src/svg-repro.ts — import this module from the app entry import rawSvg from './icon.svg?raw' export { rawSvg } Run the native dev server ( curl 'http://127.0.0.1:5173/ns/m/src/svg-repro.ts' curl 'http://127.0.0.1:5173/ns/m/src/icon.svg?raw' These snippets illustrate the minimal import shape; the actual HTTP checks used equivalent SVG imports in the existing consumer rather than a fresh standalone project. ExpectedThe SVG module's default export is the SVG XML string. The importer and ObservedTwo behaviors were verified through actual native dev HTTP responses:
This causes a concrete Android failure when consumer code converts the presumed XML into a data URI. A value that is already a URI becomes double-encoded. Octane's SVG source normalizer decodes once, leaving the literal Relevant source
This source observation is separate from the verified behavior in the patched consumer; I have not run a clean current-main native app. Consumer workaround and validationThe app now preserves existing SVG data URIs, resolves root-relative dev asset URLs against the HTTP module URL so the framework can fetch XML, and only data-encodes actual XML input. Source probes for imports from four asset groups then produced valid XML, and regression tests cover raw XML, existing percent/base64 data URIs, and non-inlined dev URLs. Android rendering has not been retested after the workaround. A bridge regression test should cover both small/inlined and larger/non-inlined SVG imports, including ActivityMetadataMetadataAssigneesLabelsTypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |