465 questions
0
votes
0
answers
10
views
Esbuild Architecture Mismatch: x64 vs. arm64 Causing Vite Build Failure After Transition from Rosetta 2
Summary of the Problem:
Error Message:
During the build (triggered via dfx build), Vite (which uses esbuild internally) fails because it detects that the installed esbuild binary is for a different ...
-1
votes
0
answers
24
views
Changed angular builder into @angular-devkit/build-angular:browser-esbuild. Now after deployment build tree shakes leaflet imports
I have reconfigured the app to use esBuild builder in order to have faster builds and smaller bundle size.
Angular 18 app uses leaflet (has a map component) which one has imports:
import * as Leaflet ...
0
votes
0
answers
18
views
Migration to Angular 18 and browser-esbuild: TypeError: Failed to fetch dynamically imported module
After migrating to Angular 18 and browser-esbuild (and vite) I installed my app to the testserver.
The app is no longer able to lazy load all submodules. It ends with
After page refresh the lazy ...
0
votes
1
answer
38
views
NX: Angular Environment Variables - process is not defined
I have a NX project with an angular app. I'd like to configure a environment variable so that some value changes depending on the deployment environment. I'm following the NX Recipe documentation for ...
0
votes
0
answers
29
views
Angular 17 esbuild: Code Masked but Not Minified in Production/Sandbox
I recently migrated my Angular 17 project from Webpack to esbuild as the build tool. Since this change, I've encountered an issue with my production and sandbox builds. While the code appears masked (...
1
vote
0
answers
39
views
Angular to load js file with loader 'file'
Angular when used with esbuild supports specifying loaders via import attributes. For example something like this:
import userImageURL from 'user.svg' with { loader: 'file' };
This works because of ...
0
votes
0
answers
49
views
Serving JavaScript files with Rails 7 and esbuild
I am using Rails 7 with esbuild, jsbundling-rails, and importmap-rails. I am using the following command to start the esbuild watcher:
esbuild app/javascript/*.* --bundle --sourcemap --format=esm \
-...
0
votes
0
answers
24
views
Serverless v4 ESBuild packaging ignoring non-js files
I have just upgraded to Serverless V4, and removed serverless-bundle as recommended.
Have configured esbuild with a loader:
loader:{
'.html': 'copy',
'.node': 'copy',
...
0
votes
0
answers
83
views
Tailwind unable to resolve import to library via paths in Nx
I'm trying to find a way of importing a tailwind.config.ts file located in @myorg/tailwind, into one of my applications so each application can share the same configuration. However, any paths in the ...
1
vote
1
answer
91
views
Is it possible to tell esbuild to ignore top-level await when bundling to node12 target?
await has been supported from Node 7.5, but top-level await has been only supported from Node 14.8.
I'm writing script for a service that will wrap user scripts inside a function and run it on Node 12....
0
votes
0
answers
66
views
High RAM Usage in Angular Build with Browser-ESBuild Script Optimization
I'm encountering a strange issue when switching my Angular build system from Webpack to ESBuild.
When using:
"builder": "@angular-devkit/build-angular:browser"
Everything works ...
0
votes
0
answers
65
views
Issue with external styles in custom elements after upgrading to Angular 19
Recently I upgraded my project with NX to Angular 19 and encountered an issue with custom elements.
I have 2 apps in my NX monorepo:
App with custom element (Widget);
Playground where the widget is ...
1
vote
1
answer
111
views
Why can't I run my esbuild script outside of package.json?
I am able to minify a CSS file when using esbuild in package.json like so.
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
...
0
votes
2
answers
157
views
"AWS CRT binary not present" when trying to run bundled server.js in NodeJS application which depends on @aws-sdk/signature-v4-crt
I am working on a NodeJS project which pulls in @aws-sdk/crt-loader as a transitive dependency of @aws-sdk/signature-v4-crt. I am generating a server.js bundle using esbuild. When starting my script ...
1
vote
1
answer
289
views
error Error: Failed to install package "@esbuild/win32-x64"
node: 16.20.0
npm: 10.8.3
angular-cli: 19.0.0
OS: win32 x64
While trying to do npm install on udemy code repository it hits with following error.
npm error path C:\Users\<username>\Documents\<...
1
vote
1
answer
163
views
Podman builds of Vite project fail
Our frontend project based on Vite is running in the backend with Docker. During release, Podman runs automated npm install and npm run build commands.
Recently, the Podman builds fail. One of the 3rd ...
0
votes
0
answers
30
views
How to let esbuild translate a single file outside of a bundle to use this bundle?
In a node package I have all my sources under the src/ folder, pretty standard. Now I want to add a binary command to this package. For that I created a cli/runner.ts script which calls a static ...
0
votes
1
answer
189
views
Rails not compiling new TailwindCSS classes in development
I have a rails app that was generated using
rails new new_app --css tailwindcss -j esbuild
This created a procfile that contains this stuff
web: env RUBY_DEBUG_OPEN=true bin/rails server -b 0.0.0.0
...
0
votes
0
answers
74
views
making esbuild treeshake with sideEffects:false
We have an Angular 18 application that used to be build with webpack. In our webpack.config.js file, we had this:
module.exports = (config, _options, targetOptions) => {
config.module.rules = [
...
3
votes
1
answer
676
views
Updating ESBuild from 0.24.0 to 0.24.1 throws strange errors
I am using tsup, which uses ESbuild, to build my libraries. Example: https://github.com/react18-tools/turborepo-template/actions/runs/12427963648/job/34698706616
When I tried investigating, I found ...
1
vote
0
answers
34
views
Ionic Standalone increase in initial bundle size. Lazy loaded components included in initial Bundle
I'm currently working on a migration from IonicModule with Webpack to Ionic Standalone Components with ESBuild.
I expected the initial bundle size to shrink, since some components are only required in ...
0
votes
0
answers
34
views
ESBuild always fails with the signal SIGSEGV
Every time I try to install most packages, they fail with the signal SIGSEGV. I've tried everything, every solution on google, uninstalling and reinstalling node, etc. Nothing works. I have no errors ...
1
vote
1
answer
440
views
How to disable esbuild direct-eval warning
In one of my apps I need the eval function. I search and can't something to replace it. When I upgrade to Angular 19, I have the following Warning in the build-watch and build-prod :
▲ [WARNING] Using ...
1
vote
1
answer
36
views
How do add esbuild to my vscode extension?
My extension requires esbuild in order to import ts files from the user's workspace but esbuild can't be bundled.
Adding !node_modules/esbuild to my .vscodeignore file did not work.
Is there a way to ...
0
votes
1
answer
213
views
AWS SAM esbuild fails when importing values from internal dependency with npm workspaces
I have a monorepo with npm workspaces, which contains a shared-types workspace that exposes type definitions and a few values to a backend workspace (AWS SAM + Typescript) and a frontend workspace (...
1
vote
1
answer
43
views
Is there any of way of avoid creating of the Node.js developing package local repository cache containing @types and else basic definitions?
I'm writing the TypeScript simplest modules to learn some of the basics of the language, therefore I need TO NOT store (4500 file items within 140MB space) • to at least 100 exercises.
To be fair, ...
0
votes
0
answers
94
views
EACCES error npm install with root privilege gitlab action
After I read this and many other github issue and stackoverflow, didn't find way to resolve it.
Error: EACCES: permission denied
I also read and tried this one as well,
How to fix EACCES issues with ...
2
votes
0
answers
187
views
How do I get esbuild to stop renaming things?
In upgrading my SpreeCommerce app, I've been trying to use esbuild as the JS bundler. I'm treating the Spree frontend JS files as a vendor directory in the app, trying to get esbuild to bundle the ...
1
vote
1
answer
128
views
esbuild not tree-shaking aws-sdk comand injected client
When bundling typescript code with esBuild, having this configuration:
const buildOpts: BuildOptions = {
target: 'es2020',
format: 'esm',
mainFields: ['module', 'main'],
metafile: true,
...
0
votes
0
answers
54
views
How to import an external module with TypeScript and esbuild?
I'm writing a storage adapter for Ghost using the @aws-sdk/client-s3. I want the adapter to be self-contained, so I'm trying to use esbuild to bundle it all into a single file. To build a storage ...
0
votes
0
answers
92
views
Problems with esBuild and GraphQL
I am trying to package a project made with TypeScript, GraphQL and serverless, using esBuild. But it throws me an error, which wants me to add the "type" to all the @Column of my entities (I ...
0
votes
1
answer
89
views
getting React is not defined when building react ts code through esbuild for electron frontend
I am building an electron app for a project, where i am loading index.html in browserWindow, in that html i am downloading the script which is bundled via esbuild. The script is downloaded ...
0
votes
1
answer
596
views
Vite drop console.log but keep console.error on esbuild
I want to remove the console.logs in the build but don't want to remove the console.errors, is there a way to do this?
This is what I currently have.
esbuild: {
drop: mode === 'production' ? ...
1
vote
0
answers
146
views
Deploy Serverless Typescript with Esbuild to AWS lambda
I am trying to deploy my serverless function. My deployment went through without any problem. However, I am encountering issues where AWS lambda console is looking for .mjs extension but the built ...
4
votes
0
answers
275
views
Migrate Angular 17 build from webpack to esbuild
Our project was using:
"builder": @angular-builders/custom-webpack:browser
for our build.
In our webpack.config.js we have this plugin:
/**
* report-result.js cannot be tree-shaked as ...
1
vote
0
answers
44
views
Does esbuild support to bundle files for express.static
I have an express project which use express.static to serve front-UI files.
app.use('/', express.static(path.join(__dirname, 'public')));
The front-UI is an Angular project, after building, it ...
0
votes
0
answers
109
views
"Failed to resolve module specifier 'events'." when bundling node modules with esbuild and esbuild-deno-loader [DENO 2]
I'm building a Chrome extension, using Deno to manage my node_modules, and esbuild-deno-loader to bundle the modules into a local file, since Chrome extensions do not allow external dependencies.
The ...
0
votes
1
answer
132
views
Change file content after esbuild transform
I would like to change the content of the file after esbuild has done its transform. E.g.,
my-file.ts
function myFunction() {
console.log('My function was called.')
}
export default myFunction
...
0
votes
0
answers
104
views
Getting errors while updating Angular build to esbuild
Updated the angular.json to use esbuild but getting these errors while building the app:
✘ [ERROR] Could not resolve "util"
(disabled):node_modules/broadcast-channel/src/methods/node.js:...
2
votes
0
answers
59
views
Unable to import modules from subpaths in a shared package using esbuild
I'm trying to set up my shared package to allow importing modules from specific subpaths (e.g., @shared/utils, @shared/hooks). To achieve this, I've configured my package.json as follows:
// package....
0
votes
0
answers
39
views
Where in javascript:install:[bundler] are the tools installed to terminal?
Question regarding jsbundling-rails gem, asked on github and posting here also for more visibility.
I've tried intalling a couple different bundlers now for a new app, essentially getting the same ...
0
votes
0
answers
192
views
How do I revert back to webpack builde in Angular 18?
I am working with Angular 18 for my project which uses esbuild to build the project bundles. I want to switch to using webpack as my bundler. I don't really have code to show because I don't know what ...
0
votes
1
answer
110
views
Tailwind not running in my Rails App. How can I see the issue so I can debug it
I switch my app from webpacker to esbuild. My biggest issue is I don't know how to debug the problem.
When I run bin/dev it exits when it running js: yarn build --watchcss: bin/rails tailwindcss:watch
...
2
votes
0
answers
31
views
Code splitting by route does not pull in child components only used on that route
I have many Vue components like the following:
<template>
<CommonChild :content="content" />
</template>
<script>
import CommonChild from '@/views/CommonChild.vue';...
0
votes
0
answers
131
views
excluding node_modules on esbuild for aws lmabda deployment
I am using Lambda Layers with my Lambda functions to host my dependencies. In my case, the lambda layer contains my entire node_modules.
The primary reason for doing this is to make each lambda ...
0
votes
0
answers
90
views
Ng build fails for SSR with new esbuild application builder Angular v17
I'm trying to implement server side rendering on my project with angular version 17 and it has new esbuild application builder. I'm getting following error while ng build.
An unhandled exception ...
0
votes
1
answer
69
views
getting an error when running esbuild --bundle
Using Esbuild to bundle a project upon a prepublishOnly script:
"esbuild src/index.ts --platform=node --outfile=dist/index.js --bundle --minify --define:process.env.NODE_ENV=\\\"production\\\...
0
votes
0
answers
105
views
Angular compiler included both in the main and polyfills chunk - how can I fix that
Angular compiler included both in the main and polyfills chunk - how can I fix that? or where do I start looking for it?
I'm using Angular 18 - on an app that started in angular 5 and was upgraded ...
1
vote
2
answers
679
views
Module Federation in Angular without Webpack and with esbuild
With Angular 18 transitioning away from Webpack to the new Angular CLI Build System, how can I implement Module Federation or a similar micro-frontend architecture without relying on Webpack? Are ...
0
votes
0
answers
42
views
How to ignore font icon pseudo element conversion in css
Font icons in css are converted to unicode characters
Given css in file
.icon-custom:before {
content: "\e903";
}
On running vite build, above lines are converted to
.icon-custom:...