# 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
最新资源
- 华彩-舜宇项目—公司年度培训计划表.doc
- 华彩-舜宇项目—联想---规划培训.ppt
- Screenshot_20241218_134907.jpg
- 华彩-舜宇项目—培训管理制度.doc
- 华彩-舜宇项目—培训管理体系.doc
- 基于flink (SQL)的特征加工平台详细文档+全部资料.zip
- 基于Flink+ClickHouse实时计算平台详细文档+全部资料.zip
- 华彩-舜宇项目—如何进行战略与年度规划培训.ppt
- 基于Flink 的商品实时推荐系统。当用户产生评分行为时,数据由 kafka 发送到 flink,根据用户历史评分行为进行实时和离线推荐。实时推荐包括:基于行为
- 基于Flink+ClickHouse构建亿级电商实时数据分析平台(PC、移动、小程序)详细文档+全部资料.zip
- 基于flink1.9.1,flink-sql-client模块SDK单独实现,支持Yarn集群的远程SQL任务发布,可以支撑flink sql任务的远程化执行详细文档+全部资料.zip
- 基于flink-sql在flink上运行sql构建数据流的平台详细文档+全部资料.zip
- 华彩咨询—杭挂集团—杭挂企业集团培训管理办法--外派培训.doc
- 华彩咨询—杭挂集团—杭挂企业集团培训管理办法(总则).doc
- 华彩咨询—杭挂集团—杭挂企业集团培训管理办法--新员工培训.doc
- 华彩咨询—杭挂集团—教育培训制度.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈