如何在 Vite 构建中保留脚本标签顺序

Fla*_*eau 6 vite

如何在 Vite 构建中保留初始脚本标签顺序?

在我的index.html head 标签中:

<script src="js/initMap.js" type="module"></script>
<script defer src="https://maps.googleapis.com/maps/api/"></script>
Run Code Online (Sandbox Code Playgroud)

在我的构建中:

<script defer src="https://maps.googleapis.com/maps/api/"></script>
<script src="js/initMap.js" type="module"></script>
Run Code Online (Sandbox Code Playgroud)