abpframework / abp

Open Source Web Application Framework for ASP.NET Core. Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET and the ASP.NET Core platforms. Provides the fundamental infrastructure, production-ready startup templates, application modules, UI themes, tooling, guides and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.27k stars 3.32k forks source link

Support release configuration for bundling instead of always debug #19603

Open RicardoLans opened 1 week ago

RicardoLans commented 1 week ago

Is there an existing issue for this?

Is your feature request related to a problem? Please describe the problem.

When changes happen in assets (js, css, images, etc) we need to execute abp bundle command to get new global.css and global.js files. But to do this every time for each branch when you make a change this is kind of undoable. Also when having multiple PR's with such changes, completing 1 PR results in unnecessary conflicts where the developer needs to merge latest changes into the PR/branch, then execute abp bundle, commit the 2 new files and push them back to the PR.

Our idea was to add the global.js and global.css to gitignore and in our builds always add the abp bundle command. However this is not working since abp bundle command is always looking in bin/debug directory, but we use release (bin/release) in our builds.

I've checked the source: File: framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlerBase.cs Method: BundleWebAssemblyFiles First line of code is hardcoded to look in bin/debug.

Describe the solution you'd like

File: framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlerBase.cs Method: BundleWebAssemblyFiles

Make the hardcoded bin/debug configurable in order to support release configuration, maybe introduce extra parameter to abp bundle command like abp bundle debug and abp bundle release

Additional context

No response