Closed exislow closed 9 months ago
Sounds like you're trying to do multiple inputs. Unfortunately, I know nothing about Svelte.
FYI, I get a similar error when trying to use the plugin with VitePress.
Config:
import { defineConfig } from "vitepress";
import { viteSingleFile } from "vite-plugin-singlefile";
export default defineConfig({
mpa: true, // no JS
vite: {
plugins: [viteSingleFile()],
},
});
Result of built:
vitepress v1.0.0-rc.25
Invalid value for option "output.inlineDynamicImports" - multiple inputs are not supported when "output.inlineDynamicImports" is true.
✖ building client + server bundles...
build error:
RollupError: Invalid value for option "output.inlineDynamicImports" - multiple inputs are not supported when "output.inlineDynamicImports" is true.
at error (file:///Users/d/Projects/resume/node_modules/vitepress/node_modules/rollup/dist/es/shared/node-entry.js:2287:30)
at getInlineDynamicImports (file:///Users/d/Projects/resume/node_modules/vitepress/node_modules/rollup/dist/es/shared/node-entry.js:26497:16)
at normalizeOutputOptions (file:///Users/d/Projects/resume/node_modules/vitepress/node_modules/rollup/dist/es/shared/node-entry.js:26388:34)
at getOutputOptions (file:///Users/d/Projects/resume/node_modules/vitepress/node_modules/rollup/dist/es/shared/node-entry.js:26811:12)
at getOutputOptionsAndPluginDriver (file:///Users/d/Projects/resume/node_modules/vitepress/node_modules/rollup/dist/es/shared/node-entry.js:26806:19)
at async handleGenerateWrite (file:///Users/d/Projects/resume/node_modules/vitepress/node_modules/rollup/dist/es/shared/node-entry.js:26782:74)
at async build (file:///Users/d/Projects/resume/node_modules/vitepress/node_modules/vite/dist/node/chunks/dep-68d1a114.js:48085:22)
at async file:///Users/d/Projects/resume/node_modules/vitepress/dist/node/serve-JefD-RjH.js:48898:20
at async task (file:///Users/d/Projects/resume/node_modules/vitepress/dist/node/serve-JefD-RjH.js:23985:5)
at async bundle (file:///Users/d/Projects/resume/node_modules/vitepress/dist/node/serve-JefD-RjH.js:48896:3)
I have the same issue when trying to build a multi-page app into static html files
Closing this, since this plugin is for single files, not multiple files.
i want the multiple files to each be bundling its own js and css
If you want multiple entry files, you should fork this plugin or write a new one that does what you need.
It's just not a use case I have, nor do I have time to make it work or support it long-term.
This plugin was written for running an entire SPA from a single file sitting on a local or networked drive, with hash-based routing.
I'm willing to add support for multiple entry files, but it only if adding that support does not significantly complicate or break what this plugin already does, and if those who need that support are willing to contribute code, tests, and documentation and take the lead on any support issues that come up.
@lockieluke see my comment here: https://github.com/richardtallent/vite-plugin-singlefile/issues/83#issuecomment-2433579057
This is a great idea and exactly what I am looking for. Thank you for your effort. But is this plugin still working?
I have issues to get working with my Svelte project: https://github.com/exislow/freeDSP-Aurora-Svelte-Frontend/tree/singlefile
Every time I try to build my project, this happens:
I have even followed this tutorial: https://sean.eulenberg.de/posts/single-file-applications-with-svelte/
Do you have any idea whats wrong?