Skip to content
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

chore: Update script tag in readme files to use type="module" for bet… #252

Merged
merged 1 commit into from
May 9, 2024

Conversation

TBXark
Copy link
Contributor

@TBXark TBXark commented May 8, 2024

最近发现之前写的网页加载js失败了,查看后发现新编译的MindElixir.js直接 html 通过 <script>标签引入会报错 Uncaught SyntaxError: export declarations may only appear at top level of a module

下面是我修改后的代码

<script type="module" src="https://cdn.jsdelivr.net/npm/mind-elixir/dist/MindElixir.js"></script>
<script type="module">
import MindElixir from "https://cdn.jsdelivr.net/npm/mind-elixir/dist/MindElixir.js";
// ...
</script>

@SSShooter SSShooter merged commit c390408 into SSShooter:master May 9, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants