mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-07 23:54:59 -05:00
fix: removing webpack junk
This commit is contained in:
parent
3b869b2e8c
commit
9303f74b1c
@ -1,5 +1,3 @@
|
||||
import MangleCssClassPlugin from "mangle-css-class-webpack-plugin";
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
images: {
|
||||
@ -10,36 +8,6 @@ const nextConfig = {
|
||||
},
|
||||
],
|
||||
},
|
||||
webpack: (config, { dev }) => {
|
||||
config.resolve.modules.push(path.resolve("./"));
|
||||
|
||||
if (!dev) {
|
||||
config.plugins.push(
|
||||
new MangleCssClassPlugin({
|
||||
classNameRegExp:
|
||||
"(([a-zA-Z-:]*)[\\\\\\\\]*:)*([\\\\\\\\]*!)?tw-[a-zA-Z-]([a-zA-Z0-9-]*([\\\\\\\\]*(\\%|\\#|\\.|\\[|\\]))*)*",
|
||||
// ignorePrefixRegExp: "((hover|focus|active|disabled|visited|first|last|odd|even|group-hover|focus-within|xs|sm|md||lg|xl)(\\\\\\\\\\\\\\\\|\\\\)?:)*",
|
||||
|
||||
classGenerator: (original, opts, context) => {
|
||||
if (classNames[original]) {
|
||||
return classNames[original];
|
||||
}
|
||||
|
||||
let nextId;
|
||||
|
||||
do {
|
||||
// Class name cannot start with a number.
|
||||
nextId = `cfk-${Math.random()}`;
|
||||
} while (/^[0-9_-]/.test(nextId));
|
||||
|
||||
return (classNames[original] = nextId);
|
||||
},
|
||||
// log: true
|
||||
})
|
||||
);
|
||||
}
|
||||
return config;
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user