Open mortona42 opened 1 month ago
As this is a dev module only it is a viable option to disable CORS, fill free to do a PR.
I do not have a working example for now as I do not work with Drupal anymore, this can take me some time to rebuild a working env and do/test the changes ;)
I'm not sure how to load this properly.
I'm getting: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://localhost:5174/@vite-plugin-drupal-template-hmr. (Reason: CORS request did not succeed). Status code: (null)
Do I need to set up headers for CORS in vite to allow loading in my local site?
Here are some related issues in unocss: https://github.com/unocss/unocss/issues/2822 https://github.com/unocss/unocss/issues/3043
They added a feature to set CORs from the plugin config, so it just looks like this:
export default defineConfig({ plugins: [ UnoCSS({ fetchMode: 'no-cors' }), ],