SnowpackProxyJsBug
This repository is a minimal reproduction of a "proxy.js" renaming issue with Snowpack.
Walkthrough
-
The
src
directory contains files that are named asfilename.ext
andfilename.ext.ts
. In this contextext
is just some other extension. This convention is often used in, for example, the C# world, with files likefilename.xaml
andfilename.xaml.cs
. -
src/a.ext
andsrc/b.ext
are empty files. -
src/a.ext.ts
contains only a function. -
src/b.ext.ts
imports the function fromsrc/a.ext.ts
with the following code:import a from "./a.ext";
-
Snowpack generates the files
build/_dist_/a.ext.js
andbuild/_dist_/b.ext.js
, as expected. -
However,
build/_dist_/b.ext.js
contains a reference to a./a.ext.proxy.js
a file that does not exist. -
Thus, a runtime error occurs when referencing
src/b.ext.ts
(or it's corresponding generated file).