# 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
最新资源
- ouc2024秋攻防先导作业
- ouc2024秋攻防先导作业
- 算数优化算法AOA对BP的权值和阈值做优化,建立多个特征变量输入,单个因变量输出的拟合预测建模 程序内注释详细,可学习性强 直接替数据就可以用,可以直接导入excel数据 程序语言为matlab
- 精确符合规范反应谱的人工合成地震波
- LINUX最新版本算法库5.0.15(1).zip
- Matlab基于量子遗传算法的函数寻优方法 量子遗传算法QGA是量子计算与遗传算法相结合的产物,是一种新发展起来的概率进化算法 代码可正常运行
- 驾校预约学习系统 源码+数据库+论文(JAVA+SpringBoot+Vue.JS+MySQL).zip
- 基于ssm+mysql图书仓储管理系统源码数据库.docx
- springboot3+vue3
- CREO7装配与产品设计-钟日铭-配套操作文件
- 基于SpringBoot+Vue.JS开发的校园志愿者管理系统 JAVA毕业设计 源码+数据库+论文(有项目截图)+启动教程
- Linux操作系统课程设计实验报告-涵盖多线程同步、内核模块编程、进程树打印、系统调用添加及块设备驱动实现
- 素材网站解析源码支持21个网站解析可搭建运营
- 285个地级市灯光数据和雾霾数据.zip
- 全桥谐振和变压器计算 看截图,知识文档,含有LLC谐振半桥计算,全桥LLC谐振和变压器的计算,描述详细使用,表格都有引用公式依据,便于理解
- vlan dnsp 111
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈