So I have a monorepo that has some Vue apps inside of it, and one package that exports Vue components.
When I want to start the app, I need to build the package that the app is dependent on.
Command is: vue-cli-service build --target lib src/index.ts
When I work on the app & package simultaneously, it is really annoying to have to run the build after each change to the package.
Is there a way to have it as hot/live build which when there are changes it will trigger a build for the package?
Related
I'm trying to build a component library for react-native.
I'm using a library called react-native-builder-bob since I figured out it was the most convenient way to do so.
The project is setup, I built a dummy button as a matter of test.
I've got the example project running.
Now I'm trying to figure out how to install the dummy button I'm building in the example project.
Here's the scripts :
Running yarn run prepare generates the lib folder :
What would be the next step(s)?
(Or is there a more convenient way to build react-native libraries?)
I build my VueJS app with vue-cli-service build --mode production, and my chunk-vendors.js weighs 3.2M.
So I decided to investigate why it's so heavy, using vue ui.
Then, I simply click on Build, and I see that chunk-vendors.js is now 1.0M !
Why is there a such difference between these two build?
Here the screenshots:
Thank you for you help!
vue ui's build command is this:
vue-cli-service build --mode production --target app --no-module --dashboard
Notice the --no-module flag, which turns off modern browser builds, which is enabled by default as of Vue CLI 5.0.0. Therefore, the command you're using (i.e., without --no-module) creates a modern build, which includes transpiled code and polyfilled bundles for legacy browsers in addition to slimmer code for modern browsers that don't require the polyfills. On the other hand, vue ui only builds the latter.
Was having some trouble with building a shared app/package in vueJS, the app is using vuetify, what is interesting is that the built code contains almost everything except for v-tooltip that is inside v-menu. The commands I tried were vue-cli-service build and then vue-cli-service build --target lib --name em-common-vue ./src/main.js.
I should note that I have been using this app with no issues until now!
Any idea why my build version is missing code?
vue 2.6.10
vuetify 1.5.14
Using the usual vue-cli-service build only includes dependencies actually used by the app.
I would like to share my Vue js application project which is in my repository with a friend. So I used vue-cli, npm/yarn and webpack to develope.
I would like to know if he needs to install also cli to run the app on his computer, or just npm install and npm run? thanks
No, the vue-cli is not strictly necessary. However, if you're used to using vue build to build & run your app, your friend might want that too. He/she could just use some other way to run the webpack build operation if installing vue-cli isn't an option.