lisonge/vite-plugin-monkey

In tampermonkey, disable <script> on dev, disable server:<script> on preview? (only 1 script active at any time)

henrikvilhelmberglund opened this issue · 4 comments

Is there any way to not have to disable the built script when going back to dev? I end up with both the server script and the client script running at the same time so the script runs twice.

what is server script and client script ?

what is server script and client script ?

Sorry for the poor explanation, server script is the result of npm run dev, client script is the result of npm run build and npm run preview.

So: (in tampermonkey dashboard)
npm run dev -> server<script>
npm run build and npm run preview -> <script>

After dev and build&preview I end up with two scripts which is fine when the development server is offline, however when I want to edit the script again I have two active scripts. I would like to know if there is a way to automatically disable the built client script when running npm run dev and also disable the development server script when running npm run preview.

set server.prefix to false

set server.prefix to false

😨 Thanks!