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
We're working on migrating to esbuild, but one problem we've run into is the HB esbuild plugin takes over the file writing to disk, but does so without respecting the output path that has been defined. This could be an Angular-specific thing potentially. The end result is the bundle files and sourcemaps are written to the workspace root directory instead of the dist folder where they belong.
We're running an Nx monorepo with several Angular applications in it. The relevant project.json looks like this:
With Angular, the outputPath can be either a string or an object with base and browser keys. I think this may be where the problem lies. The HB sourcemap upload plugin is writing the files, but only using the file's path property, not looking at anything else, which to me means somewhere in the writing process the outputPath should be considered.
Edit: here's a reproducible repo https://github.com/getabetterpic/hb-esbuild. Running npx nx build app outputs all built files to the root workspace directory instead of in the dist folder.
The text was updated successfully, but these errors were encountered:
We're working on migrating to esbuild, but one problem we've run into is the HB esbuild plugin takes over the file writing to disk, but does so without respecting the output path that has been defined. This could be an Angular-specific thing potentially. The end result is the bundle files and sourcemaps are written to the workspace root directory instead of the
dist
folder where they belong.We're running an Nx monorepo with several Angular applications in it. The relevant
project.json
looks like this:With Angular, the
outputPath
can be either a string or an object withbase
andbrowser
keys. I think this may be where the problem lies. The HB sourcemap upload plugin is writing the files, but only using the file'spath
property, not looking at anything else, which to me means somewhere in the writing process theoutputPath
should be considered.Edit: here's a reproducible repo https://github.com/getabetterpic/hb-esbuild. Running
npx nx build app
outputs all built files to the root workspace directory instead of in thedist
folder.The text was updated successfully, but these errors were encountered: