We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
No description provided.
The text was updated successfully, but these errors were encountered:
<script type="module" src="xxx.js"></script> <script nomodule src="xxx.legacy.js"></script>
支持 <script type="module"> 的浏览器,会识别 nomodule 属性,会自动忽略未使用 ES module 的代码。
nomodule
不支持 <script type="module"> 的浏览器,会忽略加载带 type="module" 的 script 标签。同时也会忽略 nomodule 属性,直接加载未使用 ES module 标准的代码。
type="module"
在 HTML 内实现 Loading 态或者骨架屏; 去掉外联 css; 缓存基础框架; 使用动态 polyfill; 使用 SplitChunksPlugin 拆分公共代码; 正确地使用 Webpack 4.0 的 Tree Shaking; 使用动态 import,切分页面代码,减小首屏 JS 体积; 编译到 ES2015+,提高代码运行效率,减小体积; 使用 lazyload 和 placeholder 提升加载体验。
from: https://zhuanlan.zhihu.com/p/37148975
Sorry, something went wrong.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: