fix(command-compile): clean up existing css compiled assets before commit - #777
fix(command-compile): clean up existing css compiled assets before commit#777Antreesy wants to merge 1 commit into
Conversation
…mmiting Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
|
This is likely because apps used to have static CSS files not emitted from JS sources. |
|
I think in your case you are missing this in logreader config: diff --git a/vite.config.ts b/vite.config.ts
index aa46437d..732f09f2 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -13,6 +13,9 @@ const config = createAppConfig({
extractLicenseInformation: {
includeSourceMaps: true,
},
+ emptyOutputDirectory: {
+ additionalDirectories: ['css'],
+ }
// Build the css/logreader-style.css instead of inlineing the styles in the js bundle
inlineCSS: false,
assetFileNames: (info) => info.name === 'index.css' ? 'css/logreader-main.css' : undefined, |
That also works, will push. Question is whether we need a warning or mention in dev docs somewhere, to avoid this in other project Or we enhance a check here? Test for |
|
Maybe also make it the default option if inject-css is not used? |
|
Or we limit the clean up to |
|
I guess messing with apps output is a bit unexpected and this should be properly handled by the build process itself, no? |
|
So to confirm before start, extending https://github.com/nextcloud-libraries/nextcloud-vite-config/blob/e5426731623ac0ef3679f4bc7db3bbfbc91b1cc8/lib/appConfig.ts#L168-L173 to check for |
Was either skipped or not considered?
Result of 'rm -rf css && npm run build' on logreader repo:

🤖 AI (if applicable)