Using PostCSS with @snowpack/plugin-build-script plugin logs error
See original GitHub issueWhen using the @snowpack/plugin-build-script
plugin combined with the PostCSS CLI microsite dev
stops and logs:
It looks like you're trying to use PostCSS!
Microsite will automatically use your configuration, but requires some 'devDependencies' to do so.
Please run 'npm install --save-dev @snowpack/plugin-postcss'
Relevant config/code:
snowpack.config.cjs
module.exports = {
'plugins': [
[
'@snowpack/plugin-build-script',
{'cmd': 'postcss', 'input': ['.css'], 'output': ['.css']},
],
],
};
package.json snippet:
"devDependencies": {
"@snowpack/plugin-build-script": "^2.1.0",
"postcss": "^8.2.5",
"postcss-cli": "^8.3.1"
},
"postcss": {
"plugins": {
"tailwindcss": {}
}
}
Wondering if there is a way to use the @snowpack/plugin-build-script
plugin instead of using @snowpack/plugin-postcss
, I really like the simplicity of the build script plugin more than a specific plugin for PostCSS if possible.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
new API for plugin errors/warnings · Issue #177 - GitHub
Currently postcss can encounter unrecoverable error during parsing, ... We should not care plugin will use error, warnings, simple logs.
Read more >PostCSS API
Transform CSS with the power of JavaScript. Auto-prefixing, future CSS syntaxes, modules, linting and more are possible with hundreds of PostCSS plugins.
Read more >postcss-log-warnings - npm
Start using postcss-log-warnings in your project by running `npm i ... process can accumulate warnings from all of the plugins it uses.
Read more >What is PostCSS? How to Use Plugins to Automate CSS Tasks
PostCSS is a Node.js tool that transforms your styles using JavaScript plugins. It generates more downloads per week on NPM than other CSS ......
Read more >PostCSS error: [object Object] is not a PostCSS plugin
Just run npm i -d postcss and the problem is solved. Basically, you need both gulp-postcss and postcss plugins in your dependencies for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Automatic PostCSS configuration has been removed in
microsite@1.2.0
!Yeah probably it’s for the config resolution, didn’t think of that!
Thought about the postcss integration some more, would prefer no predefined integration but instead setting it in the snowpack config as a plugin like done in Snowpack. Having it kind of integrated but not fully out of the box feels off to me…