Summary: | Improve build of "vue/dist" files | ||
---|---|---|---|
Product: | Koha | Reporter: | David Cook <dcook> |
Component: | Architecture, internals, and plumbing | Assignee: | David Cook <dcook> |
Status: | Passed QA --- | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | jonathan.druart, paul.derscheid, philippe.blouin |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | 37911, 39849 | ||
Bug Blocks: | |||
Attachments: |
Bug 40773: Do not map "vue/dist" files in Makefile
Bug 40773: Do not map "vue/dist" files in Makefile Bug 40773: Do not map "vue/dist" files in Makefile |
Description
David Cook
2025-09-09 02:10:42 UTC
Created attachment 186271 [details] [review] Bug 40773: Do not map "vue/dist" files in Makefile This change ensures that "vue/dist" files are not mapped into the pm_to_blib target of the Makefile, so that they are only handled by the explicit compile steps in the top targets of the Makefile. Test plan: 0. Apply the patch 1. perl build-resources.PL 2. ls ./koha-tmpl/intranet-tmpl/prog/js/vue/dist 3. Note that files are present 4. perl Makefile.PL 5. Take all the defaults 6. vi Makefile 7. Search for vue\/dist 8. Note that the only hit is for "cp -r koha-tmpl/intranet-tmpl/prog/js/vue/dist blib/INTRANET_TMPL_DIR/prog/js/vue/" Note that anything in "koha-tmpl/intranet-tmpl/prog/js/vue/dist/" will be copied across into the "blib". I wonder if rspack.config.js or something else should have a step that ensures that "koha-tmpl/intranet-tmpl/prog/js/vue/dist/" is empty before doing a build? I suppose build-resources.PL could also do that. Anyway, I'd say that's a bit of a side issue really. Created attachment 186279 [details] [review] Bug 40773: Do not map "vue/dist" files in Makefile This change ensures that "vue/dist" files are not mapped into the pm_to_blib target of the Makefile, so that they are only handled by the explicit compile steps in the top targets of the Makefile. Test plan: 0. Apply the patch 1. perl build-resources.PL 2. ls ./koha-tmpl/intranet-tmpl/prog/js/vue/dist 3. Note that files are present 4. perl Makefile.PL 5. Take all the defaults 6. vi Makefile 7. Search for vue\/dist 8. Note that the only hit is for "cp -r koha-tmpl/intranet-tmpl/prog/js/vue/dist blib/INTRANET_TMPL_DIR/prog/js/vue/" Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Hi David, great change. Thanks. Btw, there's a webpack/rspack option: output: { ... clean: true, } that does exactly that. But we should probably work on the structure beforehand. This should be configured for prod, not for dev where you might want to keep old assets. Meaning should be a follow-up, out of scope for this bug. For reference: https://rspack.rs/config/output#outputclean Created attachment 186281 [details] [review] Bug 40773: Do not map "vue/dist" files in Makefile This change ensures that "vue/dist" files are not mapped into the pm_to_blib target of the Makefile, so that they are only handled by the explicit compile steps in the top targets of the Makefile. Test plan: 0. Apply the patch 1. perl build-resources.PL 2. ls ./koha-tmpl/intranet-tmpl/prog/js/vue/dist 3. Note that files are present 4. perl Makefile.PL 5. Take all the defaults 6. vi Makefile 7. Search for vue\/dist 8. Note that the only hit is for "cp -r koha-tmpl/intranet-tmpl/prog/js/vue/dist blib/INTRANET_TMPL_DIR/prog/js/vue/" Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> (In reply to Paul Derscheid from comment #5) > Btw, there's a webpack/rspack option: > output: { > ... > clean: true, > } > that does exactly that. > > But we should probably work on the structure beforehand. > This should be configured for prod, not for dev where you might want to keep > old assets. Meaning should be a follow-up, out of scope for this bug. I had a feeling that you'd know what to do! |