You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered with the vite-plugin-html plugin. I have been attempting to dynamically inject a script file into my HTML using this plugin, but I have found that when I include the type attribute in the script tag, the injection seems to be skipped.
Here are the steps to reproduce the issue:
Install the vite-plugin-html plugin in your project
Add a script file to your project with a type attribute, for example: <script type="module" src="./my-script.js"></script>
Configure the vite-plugin-html plugin in your vite.config.js file to include this script file using the inject option:
Run the project with the vite build command and observe that the script file is not injected into the HTML.
I have found that when I remove the type attribute from the script tag in my script file, the injection works as expected. However, I need to include the type attribute in order to use ES modules.
Please let me know if there is a workaround for this issue, or if a fix can be included in a future release of the plugin.
Thank you for your attention to this matter.
The text was updated successfully, but these errors were encountered:
I encountered with the vite-plugin-html plugin. I have been attempting to dynamically inject a script file into my HTML using this plugin, but I have found that when I include the type attribute in the script tag, the injection seems to be skipped.
Here are the steps to reproduce the issue:
Install the vite-plugin-html plugin in your project
Add a script file to your project with a type attribute, for example:
<script type="module" src="./my-script.js"></script>
Configure the vite-plugin-html plugin in your vite.config.js file to include this script file using the inject option:
In your HTML file, include the <%- injectScript %> variable:
Run the project with the vite build command and observe that the script file is not injected into the HTML.
I have found that when I remove the type attribute from the script tag in my script file, the injection works as expected. However, I need to include the type attribute in order to use ES modules.
Please let me know if there is a workaround for this issue, or if a fix can be included in a future release of the plugin.
Thank you for your attention to this matter.
The text was updated successfully, but these errors were encountered: