You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an existing issue that is already proposing this?
I have searched the existing issues
Is your feature request related to a problem? Please describe it
I am trying to bundle all files into single main file, it's work until supposed conflict with some dependencies, because @nestjs /mapped-types required [email protected] for work, but my project need [email protected].
trying run this command with bun and esbuild
bun run nest build
esbuild --bundle --minify --sourcemap=external --platform=node --target=es2020 --outdir=bin .\dist\main.js
X [ERROR] Could not resolve "class-transformer/storage"
node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_mu3cclgr33ip2qq3tugjdeyzwe/node_modules/@nestjs/mapped-types/dist/type-helpers.utils.js:80:35:
80 │ ...lassTransformer = require('class-transformer/storage');
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "class-transformer/storage" as external to
exclude it from the bundle, which will remove this error and leave
the unresolved path in the bundle. You can also surround this
"require" call with a try/catch block to handle this failure at
run-time instead of bundle-time.
Describe the solution you'd like
I have new solution! let me explain.
[email protected] keep it class-transformer/cjs/storage.js until now, so replacing from
What is the motivation / use case for changing the behavior?
to make it single bundle file or compile it to executable exe if supported by platform like bun, deno, or something similarity, make it fast because bundle with minify.
The text was updated successfully, but these errors were encountered:
Yeah, we can't do that yet as this would introduce a breaking change. We'll address that in the next major release
Not bad, I have another solution with my problem, thanks for sharing your time, my another solution to built single file with injection link script to class-transformer to link /storage.js to /cjs/storage.js, yea it's work, I am built with powershell script build.ps1 👌🏻✨ source ready to compile 😎
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
I am trying to bundle all files into single main file, it's work until supposed conflict with some dependencies, because
@nestjs /mapped-types
required[email protected]
for work, but my project need[email protected]
.trying run this command with bun and esbuild
Describe the solution you'd like
I have new solution! let me explain.
[email protected]
keep itclass-transformer/cjs/storage.js
until now, so replacing fromwith
it's work. no error message from my console! but idk this is make some bad decision in the feature. :)
Teachability, documentation, adoption, migration strategy
no migration, but not tested as well
What is the motivation / use case for changing the behavior?
to make it single bundle file or compile it to executable exe if supported by platform like bun, deno, or something similarity, make it fast because bundle with minify.
The text was updated successfully, but these errors were encountered: