I have been trying to have tailwind parse the html generated by the pre-render process of Angular with no success. I think this is because the tailwind processing needs to be added to the pre-render builder. With other builds [build, server, etc.] this can easily be accomplished with custom angular builds. However, no custom builder to augment the web pack script for pre-render exists. Therefore, I think the only path forward to integrate tailwind processing of generated pre-rendered html files into the native build (angular.json) of Angular will be to create a custom builder. Anyone familiar does any of this sound like the right path.
The other option is just to run tailwind after the build and generate a separate css file. However, I would really prefer to have this part of the build process defined by angular.json.
The tailwind processing needs to run after all the routes are pre-rendered to the distribution using this builder.
In the case of prerender the target will be prerender and custom webpack config will be the one for additional measures after the app has been pre-rendered. In this case running tailwind pointed at dist through webpack.
I have been trying to have tailwind parse the html generated by the pre-render process of Angular with no success. I think this is because the tailwind processing needs to be added to the pre-render builder. With other builds [build, server, etc.] this can easily be accomplished with custom angular builds. However, no custom builder to augment the web pack script for pre-render exists. Therefore, I think the only path forward to integrate tailwind processing of generated pre-rendered html files into the native build (angular.json) of Angular will be to create a custom builder. Anyone familiar does any of this sound like the right path.
The other option is just to run tailwind after the build and generate a separate css file. However, I would really prefer to have this part of the build process defined by angular.json.
The tailwind processing needs to run after all the routes are pre-rendered to the distribution using this builder.
https://github.com/angular/universal/blob/main/modules/builders/src/prerender/index.ts
I think this can easily be done by following in the footsteps of custom webpack builders.
https://github.com/just-jeb/angular-builders/blob/master/packages/custom-webpack/src/server/index.ts
builds reference
https://github.com/angular/angular-cli/tree/main/packages/angular_devkit/build_angular/src/builders
Meat and potatos of render process.
https://github.com/angular/universal/blob/main/modules/builders/src/prerender/worker.ts
The druid webpack builder:
In the case of prerender the target will be prerender and custom webpack config will be the one for additional measures after the app has been pre-rendered. In this case running tailwind pointed at dist through webpack.