-
-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to remove hash from filenames #375
Comments
Svelte doesn't build files, the old Svelte template that uses Rollup does. To configure that in Vite or SvelteKit, you can use Vite's |
Thanks for tip @bluwy Modifying the vite.config.js to the following solves this issue
|
Currently I am working with Electronic Devices, mainly ESP32 and ESP8266, in them I have a Web administrator made with Svelte. When I run the npm run build I get 2 relevant files, bundle.js and bundle.css which contain just what I need. Today I downloaded the new version of SvelteKit and I can't configure it to return only those two files, on the contrary it returns many js files in several folders. The microcontroller does not handle a file system where it can create subfolders, so the way it generates the files no longer works for me. I really like Svelte and I've been using it since it came out and I want to keep using it. Please, if you can guide me how to configure it, I will be eternally grateful. |
This doesn't work anymore ;-(
I get the following build messages:
Any other options to remove the hash from the file names? |
@mdocter the message you posted shows that you encountered a config problem with Svelte-Kit. If you need help with configuring it, please ask on svelte-discord . You can also search for a solution in the SveliteKit repo This is not related to vite-plugin-svelte at all. |
@dominikg You are right Dominik. SvelteKit overwrites these settings, so this is not the right place to elaborate on this topic. Do you want me to remove these two comments? |
Describe the problem
Svelte used to build files (css,js,png,etc.) without hashing the file names?
This makes embedding into wordpress much simpler.
I have several svelte apps which I am dynamically inserting into wordpress content via shortcodes. In wordpress/php I wp_register_script() and wp_enqueue_script() to add the css and js assets to the wordpress page render process. These filenames can not change. I then insert the svelte startup markup into the content. e.g. svelte:
, or sveltekit: start({...})Describe the proposed solution
option to not hash filenames
Alternatives considered
This is related to sveltejs/kit#3882
Importance
i cannot use vite-plugin-svelte without it
The text was updated successfully, but these errors were encountered: