---
title: "The application building system in the JSS Vue.js sample app"
slug: "the-application-building-system-in-the-jss-vue-js-sample-app"
abstract: "Tools you can use when building Vue.js applications with JSS"
---
# The application building system in the JSS Vue.js sample app

The JSS Vue.js app includes some build system helpers to simplify working with the app.

<details>
<summary><h2>Scaffolding</h2></summary>

You can [scaffold a new JSS Vue component](https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-headless-development/scaffolding-components-in-jss-apps.html "Scaffolding components in JSS apps") using the `jss scaffold <componentName>` command. The scaffold is defined by `scripts/scaffold-component.js`, and is fully customizable to your needs. Scaffolding creates the Vue component and the disconnected component definition files, then provides helpful feedback about what to do to make your component work.

> [!note]
> Vue components are scaffolded using Single File Components. If you prefer not to use Single File Components, you can customize the scaffolding script to your needs.

</details>

<details>
<summary><h2>Dynamic config generation</h2></summary>

The JSS app must be able to read aspects of the JSS configuration, such as the current Layout Service endpoint config. To accomplish this, before a build runs, the script defined in `scripts/generate-config.js` runs and dynamically assembles the `src/temp/config.js` file. The application can import this file when it needs access to the configuration. This script is fully customizable and/or removable if you have different configuration requirements.

</details>

<details>
<summary><h2>Dynamic component factory module</h2></summary>

When a build starts, the JSS Vue app automatically generates [the component factory](https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-headless-development/the-component-factory.html "The Component Factory") in the `src/temp/componentFactory.js` file. The component factory is a mapping between JSS component names and their Vue component implementations. The `src/temp/componentFactory.js` file is generated using conventions for defining your JSS components. It helps avoid manually registering new components. When the app runs locally, the component factory watches for new components and updates the module. This auto-generation is defined in `scripts/generate-component-factory.js`, and is fully customizable.

> [!note]
> To remove this convention from your JSS application:
>
> -   In the `src/temp/.gitignore` file, remove `componentFactory.js`.
>
> -   Delete `/scripts/generate-component-factory.js`.
>
> -   In the `/scripts/bootstrap.js` file, remove the reference to the deleted script.

</details>