Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/weijuer/w-rollup-starter-lib-vue
https://github.com/weijuer/w-rollup-starter-lib-vue
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/weijuer/w-rollup-starter-lib-vue
- Owner: weijuer
- Created: 2022-10-01T07:01:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-01T07:01:45.000Z (over 2 years ago)
- Last Synced: 2024-11-13T07:34:54.282Z (2 months ago)
- Language: JavaScript
- Size: 166 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# w-rollup-starter-lib-vue
This repo contains a bare-bones example of how to create a vue base UI library using Rollup, including importing a module from `node_modules` and converting it from CommonJS.# devDependencies info
- JSON
- @rollup/plugin-json
- CSS
- rollup-plugin-postcss
- postcss
- autoprefixer
- cssnano
- less
- Vue
- rollup-plugin-vue
- @vue/compiler-sfc
# Usagefor umd
```html
myLib
// umd
const { createApp } = Vue;
const app = createApp();
console.log('myLib', myLib)app.use(myLib);
app.mount('#app');
```
for esm
```js
// esm
import { createApp } from 'vue'
import myLib from 'w-rollup-starter-lib-vue'
import 'w-rollup-starter-lib-vue/dist/index.css'createApp().use(myLib).mount('#app')
```