# vue
## Which dist file to use?
- **`vue.global(.prod).js`**:
- For direct use via `<script src="...">` in the browser. Exposes the `Vue` global.
- Note: global builds are not [UMD](https://github.com/umdjs/umd) builds. Instead they are built as [IIFEs](https://developer.mozilla.org/en-US/docs/Glossary/IIFE).
- **`*vue(.runtime).esm-bundler.js`**:
- For use with bundlers like `webpack`, `rollup` and `parcel`.
- Leaves prod/dev branches with `process.env.NODE_ENV` guards (must be replaced by bundler)
- Does not ship minified builds (to be done together with the rest of the code after bundling)
- imports dependencies (e.g. `@vue/runtime-core`, `@vue/runtime-compiler`)
- imported depdencies are also `esm-bundler` builds and will in turn import their dependencies (e.g. `@vue/runtime-core` imports `@vue/reactivity`)
- this means you **can** install/import these deps individually without ending up with different instances of these dependencies.
- **`vue.runtime.esm-bundler.js`**: runtime only, does not include runtime template compilation support. **This is the default entry for bundlers (via `module` field in `package.json`)** because when using a bundler templates are typically pre-compiled (e.g. in `*.vue` files).
- **`vue.esm-bundler.js`**: includes the runtime compiler. Use this if you are using a bundler but still want runtime template compilation (e.g. in-DOM templates or templates via inline JavaScript strings).
- **`vue.esm(.prod).js`**:
- For usage via native ES modules imports (in browser via `<script type="module">`, or via Node.js native ES modules support in the future)
- Inlines all dependencies - i.e. it's a single ES module with no imports from other files
- this means you **must** import everything from this file nad this file only to ensure you are getting the same instance of code.
- Hard-coded prod/dev branches, and the prod build is pre-minified (you will need to use different files for dev/prod)
- **`vue.cjs(.prod).js`**:
- For use in Node.js server-side rendering via `require()`.
- The dev/prod files are pre-built, but are dynamically required based on `process.env.NODE_ENV` in `index.js`, which is the default entry when you do `require('vue')`.
a3737337
- 粉丝: 0
- 资源: 2869
最新资源
- 基于阿里Dubbo框架的服务切换工具资料齐全+详细文档.zip
- 基于大规模生产实践的,适合公司内部二开迭代dubbo的模板资料齐全+详细文档.zip
- 基于大众点评CAT(v1.3.6)监控的扩展,主要是跨服务的消息树(dubbo、http方式)、Cache以及DB监控等资料齐全+详细文档.zip
- 基于将dubbo协议转http的网关资料齐全+详细文档.zip
- 基于分布式微服务架构(在线电影),技术架构有SpringBoot、SpringCoud、dubbo、mybatis-plus、Druid,采用前后端分离方式进行
- 基于微服务架构的班车预约系统,第一个版本:springboot+mybatis+dubbo+mysql+redis等。第二个版本:spring-cloud重构,
- 滚动轴承故障诊断MATLAB程序:快速谱峭度、谱峭度+包络谱分析 滚动轴承故障诊断是机械工程领域的一个重要研究方向 滚动轴承是一种常见的机械元件,用于支撑和转动机械装置中的轴 然而,由于长时间使用或其
- matlab GUI界面设计
- VSC下垂控制策略仿真模型,支持MATLAB2014a及以上版本
- wechat4.0多开工具
- 课程大作业2:视觉功能库封装 作业内容: 利用预训练模型,基于1ibsophon(tpu-runtime)实现一个视觉功能(目标检测)的库 作业要求: 1)提交 patch 到tpu-mli 工程
- 学习笔记整理成语音.docx
- 毕设和企业适用springboot智能语音识别平台类及物流追踪系统源码+论文+视频.zip
- PPT_20241224_090531.pptx
- ai提示规则.txt啊啊啊
- Visual Studio Code的测试功能详细介绍.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈