question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using PostCSS with @snowpack/plugin-build-script plugin logs error

See original GitHub issue

When 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:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
natemoo-recommented, Mar 20, 2021

Automatic PostCSS configuration has been removed in microsite@1.2.0!

1reaction
Siilwyncommented, Feb 11, 2021

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…

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found