From 3f30a220ee177e3bd1274479fb733c949ce8e080 Mon Sep 17 00:00:00 2001 From: Julien Ripouteau Date: Mon, 29 Jan 2024 13:53:39 +0100 Subject: [PATCH] Note about ace.js file rewrite (#16) * 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> --- content/docs/fundamentals/typescript_build_process.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/docs/fundamentals/typescript_build_process.md b/content/docs/fundamentals/typescript_build_process.md index c5e1603..abebff0 100644 --- a/content/docs/fundamentals/typescript_build_process.md +++ b/content/docs/fundamentals/typescript_build_process.md @@ -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