fix: update ddev to include all tailwind css styles

This commit is contained in:
2025-04-21 19:24:29 +02:00
parent baf203e4fd
commit b7de6dee99
5 changed files with 25 additions and 285 deletions

View File

@@ -1,10 +1,13 @@
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
mode: 'production',
entry: './packages/base/Resources/Public/Scss/main.scss',
output: {
module.exports = (env, argv) => {
const isProduction = argv.mode === 'production';
return {
mode: isProduction ? 'production' : 'development',
entry: './packages/base/Resources/Public/Scss/main.scss',
output: {
path: path.resolve(__dirname, 'packages/base/Resources/Public/Css'),
filename: 'main.js' // JS not needed, but required by Webpack. The CSS will be extracted.
},
@@ -15,17 +18,7 @@ module.exports = {
use: [
MiniCssExtractPlugin.loader,
'css-loader',
{
loader: 'postcss-loader',
options: {
postcssOptions: {
plugins: {
tailwindcss: {},
autoprefixer: {},
}
}
}
},
'postcss-loader', // Always use postcss-loader
'sass-loader'
]
}
@@ -36,4 +29,5 @@ module.exports = {
filename: 'main.css'
})
]
};
};