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
I'm trying to get Statiq to run Webpack, to allow for tailwind CSS classes to be generated. Webpack itself is working, and creating the CSS and JS files as expected, however trying to add these as documents for output with ReadFiles is not working.
My pipeline to achieve this looks like this:
bootstrapper.BuildPipeline("Webpack",
builder =>builder.WithProcessModules(// Run webpacknewStartProcess("npx").WithArgument("webpack").WithWorkingDirectory(nodeDirectory).KeepContent().LogErrors().LogOutput(),// Collect the files from WebpacknewReadFiles(Path.Combine(nodeDirectory,"dist","*")),// Set the output destination for the files to the assets foldernewSetDestination(Config.FromDocument((doc)=>doc.Source.Extension==".css"?newNormalizedPath("assets/css/styles.css"):newNormalizedPath("assets/"+doc.Source.Extension.Replace(".","",StringComparison.InvariantCultureIgnoreCase)+"/"+doc.Source.FileName)),true),// Write the files to the outputnewWriteFiles())// run before content analysis.AsDependencyOf("AnalyzeContent").AsDeployment()// Run after other phases that would create content with CSS classes in.WithDependencies("Archives","Assets","Content"));
The initial step of running Webpack works and the files are generated in webpack's dist folder, however Statiq's logs indicate that ReadFiles does not find any files in the folder. Using specific filenames instead of the globbing pattern gives the same result. Adding a LogMessage before the ReadFiles indicates that the path searched for the files is correct.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to get Statiq to run Webpack, to allow for tailwind CSS classes to be generated. Webpack itself is working, and creating the CSS and JS files as expected, however trying to add these as documents for output with ReadFiles is not working.
My pipeline to achieve this looks like this:
The initial step of running Webpack works and the files are generated in webpack's
dist
folder, however Statiq's logs indicate thatReadFiles
does not find any files in the folder. Using specific filenames instead of the globbing pattern gives the same result. Adding aLogMessage
before the ReadFiles indicates that the path searched for the files is correct.Beta Was this translation helpful? Give feedback.
All reactions