> For the complete documentation index, see [llms.txt](https://community-test.logicnets.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://community-test.logicnets.com/release-9/platform-documentation/layout/combinebundle-javascriptcss-files.md).

# Combine/Bundle JavaScript/CSS Files

## Combine JavaScipt/CSS Files

Combining JavaScript and/or CSS files can reduce load times, as each call to the server requires additional time. To reduce the number of calls, you can bundle multiple files into one using the steps below.

## Project Settings

To bundle JavaScript/CSS files, you must update settings on the project level. JavaScript and CSS files have to be bundled into separate files, and it is possible to enable bundling for each file type independently.

1. Click on your project and click *modify* on the Details tab.
2. Scroll down to the Layout section and select '**yes**' from the dropdown menus for bundling JavaScript and CSS files. ![](https://2802811211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdFhfexCjZ5JMhwGzzywq%2Fuploads%2Fgit-blob-bc9377271c83a2f4c9c3f299201bd92695218608%2F9ece26be-cef3-43cc-a505-fba94889c5d9.png?alt=media)
3. Specify the files that need to be bundled by listing them in the input boxes below the bundling dropdown menu. To keep the paths to the files relative you can use the following data objects:

* $(lncorepath) - for files located in the lncore directory of LogicNets. These files contain core functionality from LogicNets.
* $(frameworkpath) - for files that are placed in the framework project. These files contain functionality specific for a framework.

  ![](https://2802811211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdFhfexCjZ5JMhwGzzywq%2Fuploads%2Fgit-blob-aa057edda2b22ddd2dde01a9ba877b4c72f65343%2F89592c58-c97c-4cf5-8c23-4d290c658cda.png?alt=media)

4. After typing the path in the textbox press the '**+**' button to add another input box. Repeat these steps for all files that should be combined.
5. Click *save* to save your updates.

## Layout File

In addition to the changes to the project settings, it is important to update the project layout file to include a placeholder for the system-generated "includes" for JavaScript and CSS.

* If JavaScript bundling is **enabled** \[\[$jsincludes]] will be replaced by the Script that requires the bundle.js file.
* If JavaScript bundling is **disabled** \[\[$jsincludes]] will be replaced by multiple script tags, one for each of the separate JavaScript files that are defined in the 'JavaScript files' setting.
* If CSS bundling is **enabled** \[\[$cssincludes]] will be replaced by the reference to the bundle.css file.
* If CSS bundling is **disabled** \[\[$cssincludes]] will be replaced by a reference for all of the separate CSS files that are defined in the 'CSS files' setting.

## Additional Information

If bundling has been enabled on a framework, this setting will overwrite the settings at the project level.

* To bundle for all projects using a framework, enable at the framework level. The system will ignore project-level settings.
* To bundle for specific projects only, disable bundling at the framework level and set bundling at the project level.

| Framework   | Project     | Runtime     |
| ----------- | ----------- | ----------- |
| Enabled     | Enabled     | Enabled     |
| Enabled     | Not Enabled | Enabled     |
| Not Enabled | Enabled     | Enabled     |
| Not Enabled | Not Enabled | Not Enabled |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://community-test.logicnets.com/release-9/platform-documentation/layout/combinebundle-javascriptcss-files.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
