i Haben Sie eine autogenerierte MAIN.CSS -Datei in SRC/Main/Ressourcen/static/main.css haben. Ich versuche, es auf die folgende Index.jte Datei anzuwenden, die in SRC/Main/JTE lebt. Die Datei Tailwind -Konfigurationen und Paket.json befinden sich in SRC/Main/Frontend .
Code: Select all
@import com.francislainy.jtetailwind.Page
@param String name
@param Page page
${page.title()}
Hello ${name}!
< /code>
, aber obwohl ich diese Skripte ausführe, die in meiner Package.json -Datei enthalten sind: < /p>
"build": "tailwindcss -i ./styles.css -o ../resources/static/main.css --minify",
"watch": "tailwindcss -i ./styles.css -o ../resources/static/main.css --watch",
< /code>
Ich sehe den Rückenwindstil nicht, obwohl die HTML -Seite mit den JTE -abgerufenen Werten angezeigt wird. Ich kann auch auf die Stile unter http: // localhost: 8080/main.css
Zugreifen/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./src/main/jte/**/*.jte', // Ensure Tailwind scans your JTE files
'./src/main/resources/static/**/*.css', // Optionally include other static resources if needed
],
theme: {
extend: {},
},
plugins: [],
}
< /code>
Ich habe dies in meiner POM -Datei: < /p>
gg.jte
jte
3.1.12
gg.jte
jte-spring-boot-starter-3
3.1.12
com.github.eirslett
frontend-maven-plugin
1.15.0
install node and npm
install-node-and-npm
generate-resources
${node.version}
${npm.version}
npm install
npm
generate-resources
install
npm build
npm
generate-resources
run build
src/main/frontend
target
https://github.com/francislainy/jtetemplate-poc
Vielen Dank. Das CSS to ./main.css