vite-plugin-monkey: Cannot build while there is another SSR plugin in the same config

Issue

I am developing a SvelteKit website which in I do host my Tampermonkey’s userscripts. I can’t manage to make the plugin be built after I added my svelte website to the repo.

adding

rollupOptions: {
	output: {
		inlineDynamicImports: false,
	},
},

in the build vite config option doesn’t work as SvelteKit:

The following Vite config options will be overridden by SvelteKit:
  - build.rollupOptions.input

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 23 (16 by maintainers)

Most upvoted comments

  • With reference to the path to the built userscript in static

Not sure I got it right.

For a file like static/some-name.script.user.js, you reference it as site.name/some-name.script.user.js. The rest is correct.

Technically you can skip the second build if there are no changes on the site and just update userscripts.

@Malix-Off

vite-plugin-monkey can not work with vite ssr plugin such as SvelteKit

What are you trying to achieve by using SvelteKit in the userscript? It is a full-stack framework. SvelteKit is supposed to run on a server. For making a userscipt with an advanced UI you need just Svelte (maybe with some router) but not SvelteKit.