ogl-typescript icon indicating copy to clipboard operation
ogl-typescript copied to clipboard

Import .js extensions / update vite to latest to support .js extensions (don't break examples)

Open RepComm opened this issue 2 years ago • 2 comments

Hello, I run webpack-free environments for my typescript using babel to compile to JS and es-module-shims to support imports maps so I can load node_modules directly into the browser with no build step / faster TS project compile times. Unfortunately browsers don't know what to do without .js extensions on esm imports.

Thankfully just about everything else can handle .js imports even when their sources are .ts, including vite starting in 2.7 beta ( https://github.com/vitejs/vite/issues/5539 ), which this repo's examples are built with.

The current version on the master branch is outdated vite, and cannot handle .js extensions, so I have updated / run the examples for testing purposes and cannot find any issues.

Running npm dev should now report ... vite v2.9.14 dev server ...

Let me know what you think.

V/r, Jon Crowder

RepComm avatar Jul 13 '22 20:07 RepComm