Comments (4)
@benjgil When will bit-app build() run?
I try to run bit build --include-tag
but only bit-env build() was run (indicated by no log produce when run)
from bit.
Great question - it's probably based on a slight confusion about what a bit-app is, so i'll try to quickly clear up.
A bit-app component is just another standalone component, shareable and must itself have an env which will compile it, test it, package it.
It's not an env, which is essentially just a component for managing other components.
But while all other components are deployed by creating a version of them that will be consumed in an eventual application, an app component needs to be fully production ready and served to a CDN.
So in addition to the regular build tasks an env runs on components (compilation, testing, creating examples and docs, packaging etc), an app component needs some extra build actions applied to it - in the main, creating the production bundle.
So the build()
function of an env contains tasks involved in the creation of a deployable version of the component (plus some bit features such as docs, component previews, etc), while on top of the env's build, the app component's build()
handles the extra production bundling that the application requires in order to be deployed.
So they're named the same as they actually get invoked during the same build pipeline, but they each have their own responsibilities
from bit.
Hi, you can find information on running a build function for an app or through an env here - https://bit.dev/reference/build-pipeline/implement-build-task
in general, when in App, the build task is specific for the component, and when through an env, the build task will run for all components configured with that env.
both will run during the bit build
command (and as such, as part of bit tag
or snap
).
you can always run this command to see all tasks for a component:
bit build --list-tasks <component-id>
from bit.
I had the same issue as @kamontat and couldnt get the app to run its build or deploy script if I ran bit build
it only seems to run with bit tag -b
or bit snap -b
from bit.
Related Issues (20)
- Test failures when testing with jest-styled-components HOT 2
- Bit snap followed by bit reset clears the forkedFrom entry to the bitmap file HOT 2
- Vite test error cannot be imported in a CommonJS module using require() HOT 3
- mocking for previews HOT 2
- Typo in docs/intro HOT 3
- I can't run express server with sqlite3 HOT 2
- Best Practice For Importing Another Bit Component to Avoid Ripple CI Failure HOT 5
- ReferenceError: jest is not defined HOT 1
- Export Error HOT 1
- Bit Installation error:- reason: self signed certificate in certificate chain HOT 3
- [WORKSPACE] How to move my package.json/ lock deps to bit workspace ? HOT 1
- [WORKSPACE] Monorepo packages/apps dependencies managements HOT 3
- [WORKSPACE] Bit status how to not be aware of some import s HOT 4
- Very slow to install bit HOT 3
- Not possible to add remote bit scope HOT 2
- [WORKSPACE] How can we install dependencies needed only HOT 7
- New workspace env not found error HOT 2
- Multiple issues when trying to tag many components HOT 2
- next/image error - React.jsx: type is invalid -- expected a string (for built-in components) or a class/function but got: object HOT 1
- Inconsistent typescript rules between custom environment compiler and build task HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bit.