Releases: torenware/vite-go
Make host and port of Vite server configurable
Vite's dev server can be configured to run somewhere different from http://localhost:3000, so it's now configurable in vite-go as well.
Prevent wrapped FileServer from exposing directory listings.
Implements an FS wrapper for the bundled file server that prevents the directory listings that http.FileServer implements. Another good tip from Alex Edwards!
Remove some test code left in the previous release
Removed some test code left from the previous release, to prevent anybody from trying what I did there :-)
Added integrated file server for project assets
Since it's fairly challenging to get file serving to work with some configurations, this release adds a pre-configured file server that has reasonable security defaults. Tests added to make sure hidden files stay hidden.
Handle embedded file systems better
embed.FS behaves differently from the os.DirFS version as to what it thinks the "current directory is". See golang/go#43431. This is now special cased.
Hot updating and build tweaks for test build
Hot updates, fixes of the build script, and some documentation changes.
Support for hot updating and improved configuration
Breaking changes:
- New configuration objects.
- NewVueGlue takes a configuration object.
- We now generate tags for hot updating from the Vite server for development.
Use absolute URIs
The release nails down the URIs of the asset links by prepending a "/". This solves the immediate problem, but is not ideal if someone is running their server from a sub-directory of their webroot. Still thinking through how best to make this configurable.
More robust manifest handling
This release:
- On the sample program, handle a greater variety of
vite.config.js
configurations. - Default to
vite.config.js
, fall back tovite.config.ts
. - More in the main README about minimal
vite.config.js
configuration, since the default generated bynpm create vite
does not specify a manifest, which we require.
Auto config is back
Separated out the Vue/Vite install on the sample program to allow testing if an install is already present.