mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 12:28:56 +00:00
update comment
This commit is contained in:
@@ -5,13 +5,13 @@ import fs from "fs/promises";
|
|||||||
import { replaceTscAliasPaths } from "tsc-alias";
|
import { replaceTscAliasPaths } from "tsc-alias";
|
||||||
import { defineConfig } from "tsup";
|
import { defineConfig } from "tsup";
|
||||||
|
|
||||||
// what you need tsup to build instead of tsx or tsc
|
// Instead of using tsx or tsc for building, consider using tsup.
|
||||||
// tsx is a drop in replacement for nodejs - rather build on top of nodejs runtime
|
// TSX serves as an alternative to Node.js, allowing you to build directly on the Node.js runtime.
|
||||||
// it works exactly like node only catch is it doesn't have a final build step else prod should be started with tsx
|
// Its functionality mirrors Node.js, with the only difference being the absence of a final build step. Production should ideally be launched with TSX.
|
||||||
// tsc is great for final build issue is we need to then do a manual copy of all static files like handlebar email etc
|
// TSC is effective for creating a final build, but it requires manual copying of all static files such as handlebars, emails, etc.
|
||||||
// another issue is commonjs. final output needs to be esm because more and more packages are migrating to esm
|
// A significant challenge is the shift towards ESM, as more packages are adopting ESM. If the output is in CommonJS, it may lead to errors.
|
||||||
// if the final output is commonjs it will just throw an error
|
// The suggested configuration offers a balance, accommodating both ESM and CommonJS requirements.
|
||||||
// the below configuration is best of both worlds
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
shims: true,
|
shims: true,
|
||||||
clean: true,
|
clean: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user