Skip to content

Commit

Permalink
fix: update path lookup for purge css
Browse files Browse the repository at this point in the history
  • Loading branch information
wiwski committed Mar 6, 2023
1 parent b678c2f commit af2d443
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ import CssMinimizerPlugin from "css-minimizer-webpack-plugin";
import { PurgeCSSPlugin } from "purgecss-webpack-plugin";
import webpack from "webpack";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

const PATHS = {
euphrosyne: path.join(__dirname, "euphrosyne"),
euphro_auth: path.join(__dirname, "euphro_auth"),
lab: path.join(__dirname, "lab"),
};

export default {
entry: {
main: [
Expand Down Expand Up @@ -98,16 +89,10 @@ export default {
}),
new MiniCssExtractPlugin(),
new PurgeCSSPlugin({
paths: globSync(
[
`${PATHS.euphrosyne}/**/*`,
`${PATHS.euphro_auth}/**/*`,
`${PATHS.lab}/**/*`,
],
{
nodir: true,
}
),
paths: globSync([`{euphrosyne,euphro_auth,lab}/**/*`], {
nodir: true,
dotRelative: true,
}),
}),
],
};

0 comments on commit af2d443

Please sign in to comment.