Vue CLI – How to write components with it
summary
Shows how to turn a Vue CLI app into a consumable library by using vue-cli-service build to emit UMD and CommonJS bundles, writing a proper entry that exports named components plus an install function and auto-installs when window.Vue exists, using configureWebpack externals to avoid bundling Vue or lodash, choosing CSS extract vs inline, setting sideEffects to preserve CSS, and using the build report to shrink a bundle from 92KB to 14KB while mentioning the p11 helper plugin.
AI-written summary · about
chapters (9)
- 0:00Start
- 3:25Adjusting build scripts
- 4:12Whats the perfect folder structure?
- 8:31Dealing with multiple components
- 16:34Babel Config
- 18:05Externalise Dependencies
- 20:56Handling CSS
- 22:33Tree Shaking
- 27:58The --report flag
related talks
30mThe Future of Vue.js and Web Components
40mVue.js - developer friendly, fast and versatile
01h 03mVue.js is going to take the world
29mManaging Complexity in Vue CLI
34mVue CLI 3 and its Graphical User Interface
08mHow to Reduce Your Vue Bundle Size With Webpack
23mStreamline your code with webpack
21mVue's Road to Vite
