-
I'm searching and not able to find this information. On StackOverflow, there is a question: Vite: Could not resolve entry module (index.html) But creating a library doesn't work. I keep getting an error about missing index.html file. I don't have any HTML file. I want to create a standalone JavaScript file. I don't have a web application to test my library. Why do I need to write a HTML file to use Vite? I use:
and this config file: import { defineConfig } from 'vite';
export default defineConfig({
build: {
target: 'es2015',
lib: {
entry: path.resolve(__dirname, 'jose.js'),
name: 'jwt',
fileName: 'js/jwt.min.js'
},
rollupOptions: {
external: ['jose'],
output: {
globals: {
jwt: 'jwt'
}
}
},
minify: true
}
}); How to disable this annoying index.html. My library is for Service Worker not HTML pages. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I was in a wrong directory. I was in |
Beta Was this translation helpful? Give feedback.
I was in a wrong directory. I was in
./dist
when running vite.