https://github.com/wanglin2/vue_dynamic_import_component
vue动态引入组件demo
https://github.com/wanglin2/vue_dynamic_import_component
Last synced: 10 months ago
JSON representation
vue动态引入组件demo
- Host: GitHub
- URL: https://github.com/wanglin2/vue_dynamic_import_component
- Owner: wanglin2
- Created: 2021-12-20T10:42:44.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-20T11:47:07.000Z (about 4 years ago)
- Last Synced: 2025-01-30T01:44:49.555Z (12 months ago)
- Language: JavaScript
- Homepage: https://wanglin2.github.io/vue_dynamic_import_component/
- Size: 38.1 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vue(3.x)动态引入组件demo
把组件单独打包,然后线上通过ajax请求组件的js资源,然后通过内置的``组件来渲染。
支持`setup`语法。
该示例使用`CDN`方式引入`vue`。
组件目录:components
启动主应用:
```bash
npm run serve
```
打包主应用:
```bash
npm run build
```
打包组件:
```bash
npm run buildComponents
```