eta
eta copied to clipboard
CDN version should be included in `https://github.com/eta-dev/eta/releases`
Is your feature request related to a problem? Please describe.
I find absolutely no way to use Eta in Vite, other than
cp -r ./node_modules/eta/dist/browser ./public/vendor/eta
rm -r ./public/vendor/eta/*.dev.*
declare global {
interface Window {
Eta: typeof import('eta')
}
}
const script = document.createElement('script')
script.src = '/vendor/eta/eta.min.js'
document.body.append(script)
const Eta = window.Eta
export default Eta
And vite.config.js
// https://vitejs.dev/config/
export default defineConfig({
build: {
rollupOptions: {
external: /^\/vendor\//,
},
},
})
I also notice that eta.min.js does not exist anywhere in Github, only in NPM and various CDN's.
Describe the solution you'd like
- Deploy
eta.min.jsandeta.min.js.maptohttps://github.com/eta-dev/eta/releases - Solve https://github.com/eta-dev/eta/issues/122
Additional context
https://eta.js.org/docs/learn/install should include Browser (non CDN).
@patarapolw Sorry for the bad question, but why is it necessary for the CDN build to be included in the Github release? I'm a bit wary of adding it there because I'd rather only keep the source code in the Github releases
To facilitate ones who doesn't use NPM at all.
Same reasons as using Github Action to build on Github, and upload to binaries to release page (tags only).
It is incomprehensible to me why there is no package in the releases that I can download and upload its content to my website.
Pardon me if I am wrong, but can't you just go to UNPKG and copy it into a file and use it like that?
wget is a possible way.
It is probably better to host it yourself, rather than hotlinking from CDN.
For JavaScript packages, the standard is to host on the NPM registry. Downloads can be downloaded from there, from unpkg, or from jsDelivr.
I think that it's not necessary to distribute the CDN files ourselves, and would just add additional complexity to the build process.