Skip to content

Commit

Permalink
Note about ace.js file rewrite (#16)
Browse files Browse the repository at this point in the history
* feat: note about ace.js rewrite

* Update content/docs/fundamentals/typescript_build_process.md

Co-authored-by: Romain Lanz <2793951+RomainLanz@users.noreply.github.com>

---------

Co-authored-by: Romain Lanz <2793951+RomainLanz@users.noreply.github.com>
  • Loading branch information
Julien-R44 and RomainLanz committed Jan 29, 2024
1 parent d8f4a2d commit 3f30a22
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions content/docs/fundamentals/typescript_build_process.md
Expand Up @@ -97,11 +97,16 @@ node ace --no-warnings --inspect serve --watch
The production build of your AdonisJS application is created using the `node ace build` command. The `build` command performs the following operations to create a [**standalone JavaScript application**](#what-is-a-standalone-build) inside the `./build` directory.

- Remove the existing `./build` folder (if any).
- Rewrite the `ace.js` file **from scratch** to remove the `ts-node/esm` loader.
- Compile frontend assets using Vite (if configured).
- Compile TypeScript source code to JavaScript using [`tsc`](https://www.typescriptlang.org/docs/handbook/compiler-options.html).
- Copy non-TypeScript files registered under the [`metaFiles`](./adonisrc_file.md#metafiles) array to the `./build` folder.
- Copy the `package.json` and `package-lock.json/yarn.lock` files to the `./build` folder.

:::warning
Any modifications to the `ace.js` file will be lost during the build process since the file is rewritten from scratch. If you want to have any additional code that runs before Ace starts, you should instead do it inside the `bin/console.ts` file.
:::

And that is all!

```sh
Expand Down

0 comments on commit 3f30a22

Please sign in to comment.