mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-21 18:08:25 +00:00
Move webapp related build files into the webapp directory
This commit is contained in:
31
modules/webapp/postcss.config.js
Normal file
31
modules/webapp/postcss.config.js
Normal file
@ -0,0 +1,31 @@
|
||||
//postcss.config.js
|
||||
const tailwindcss = require("tailwindcss");
|
||||
|
||||
const devPlugins =
|
||||
[
|
||||
require('postcss-import'),
|
||||
tailwindcss("./tailwind.config.js"),
|
||||
require("autoprefixer")
|
||||
];
|
||||
|
||||
const prodPlugins =
|
||||
[
|
||||
require('postcss-import'),
|
||||
tailwindcss("./tailwind.config.js"),
|
||||
require("autoprefixer"),
|
||||
require("@fullhuman/postcss-purgecss")({
|
||||
content: [
|
||||
"./src/main/elm/**/*.elm",
|
||||
"./src/main/styles/keep.txt",
|
||||
"../restserver/src/main/templates/*.html"
|
||||
],
|
||||
defaultExtractor: content => content.match(/[A-Za-z0-9-_:/\.]+/g) || []
|
||||
}),
|
||||
require('cssnano')({
|
||||
preset: 'default'
|
||||
})
|
||||
]
|
||||
|
||||
module.exports = (ctx) => ({
|
||||
plugins: ctx.env === 'production' ? prodPlugins : devPlugins
|
||||
});
|
Reference in New Issue
Block a user