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: extensionless shared-workspace module requests return 404 · Issue #11570 · NativeScript/NativeScript Open Labels Description
Verified with the unpatched production NativeScript HTTP route, Vite 8.3.0 and Node 26.12.0. No Coreframe or Octane plugins, device runtime, or images are involved. This is separate from the graph-identity collision in #11569. Expected and observedWith a native project at
Both should serve the same module. ReproductionCreate these files in an empty directory, run
{
"name": "nativescript-hmr-identity-repro",
"version": "0.0.0",
"private": true,
"type": "module",
"packageManager": "[email protected]",
"scripts": {
"check": "node repro.mjs"
},
"devDependencies": {
"@nativescript/vite": "8.0.20",
"vite": "8.3.0"
}
}
packages: - . allowBuilds: esbuild: true "@parcel/watcher": true minimumReleaseAgeExclude: - "@nativescript/[email protected]"
import assert from 'node:assert/strict' import { mkdtempSync, realpathSync, mkdirSync, writeFileSync, rmSync } from 'node:fs' import { createRequire } from 'node:module' import { tmpdir } from 'node:os' import { join } from 'node:path' import { pathToFileURL } from 'node:url' import { createServer } from 'vite' const ns = pathToFileURL(createRequire(import.meta.url).resolve('@nativescript/vite')) const { registerNsModuleServerRoute } = await import(new URL('./hmr/server/websocket-ns-m.js', ns)) const { setProjectFlavor } = await import(new URL('./helpers/flavor.js', ns)) setProjectFlavor('javascript') const workspace = realpathSync(mkdtempSync(join(tmpdir(), 'ns-workspace-fetch-'))) const root = join(workspace, 'native') mkdirSync(join(root, 'src'), { recursive: true }) mkdirSync(join(workspace, 'shared/src'), { recursive: true }) writeFileSync(join(root, 'package.json'), '{"type":"module"}') writeFileSync(join(workspace, 'pnpm-workspace.yaml'), 'packages:\n - native\n') writeFileSync(join(workspace, 'shared/src/screen.tsx'), 'export default "baseline";') const server = await createServer({ root, configFile: false, logLevel: 'silent', optimizeDeps: { noDiscovery: true }, server: { host: '127.0.0.1', port: 0, watch: null, fs: { allow: [workspace] } }, plugins: [{ name: 'native-route-repro', configureServer(server) { registerNsModuleServerRoute(server, { verbose: false, appVirtualWithSlash: '/src/', sfcFileMap: new Map(), depFileMap: new Map(), getGraphVersion: () => 1, getStrategy: () => ({ flavor: 'javascript' }), depsBundle: null, sharedTransformRequest: (id) => server.transformRequest(id), ensureInitialGraphPopulationStarted() {}, upsertGraphModule() {}, }) } }], }) try { await server.listen() const origin = `http://127.0.0.1:${server.httpServer.address().port}` const results = [] for (const url of ['/ns/m/shared/src/screen.tsx', '/ns/m/shared/src/screen']) { const response = await fetch(origin + url) results.push({ url, status: response.status }) await response.text() } console.log(JSON.stringify(results)) writeFileSync(new URL('./workspace-fetch-result.json', import.meta.url), JSON.stringify(results, null, 2) + '\n') assert.ok(results.every(({ status }) => status === 200), 'HMR extensionless fetch must serve the same shared module as its static URL') } finally { await server.close() rmSync(workspace, { recursive: true, force: true }) } Source finding and requested fix
Please resolve the same extension/platform candidates under the project/workspace filesystem roots and preserve Vite filesystem access checks. A local exact-version patch doing that passes a real HTTP regression for native-host, shared-workspace and external-source modules, together with graph/hot-context identity checks. This report does not claim device HMR qualification or an upstream-main runtime test. 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. |