You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// postcss.config.js
const purgecss = require("@fullhuman/postcss-purgecss")({
// Specify the paths to all of the template files in your project
content: ["./themes/losvast20/**/*.ejs"],
// Include any special characters you're using in this regular expression
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || []
});
const nano = require("cssnano")({
preset: "default"
});
const hash = require("postcss-hash")({
algorithm: "sha256",
trim: 20,
manifest: "./manifest.json"
});
console.log("*******", process.env.NODE_ENV);
process.env.NODE_ENV = "production";
module.exports = {
from: undefined,
plugins: [
require("postcss-nested"),
require("postcss-color-function"),
require("tailwindcss"),
...(process.env.NODE_ENV === "production" ? [purgecss, nano, hash] : [])
]
};
It worked up to the point that I added hashing.
At that point I got an error
ERROR Asset render failed: css/style.css
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
at validateString (internal/validators.js:125:11)
at Object.dirname (path.js:1260:5)
at Object.rename (/Users/code/clients/losvast/node_modules/postcss-hash/utils.js:27:19)
at /Users/code/clients/losvast/node_modules/postcss-hash/index.js:23:32
I'm completely new to postcss and am using it in this project to become more familiar
The text was updated successfully, but these errors were encountered:
I'm thinking this might be the same problem as #5.
I also have no luck making this work. Applying the check from #5 will just not create any hashed file for me.
I'm having trouble with my script. I have
It worked up to the point that I added hashing.
At that point I got an error
I'm completely new to postcss and am using it in this project to become more familiar
The text was updated successfully, but these errors were encountered: