Skip to content

PostCSS

PostCSS is a tool for transforming styles with JS plugins. These plugins can lint your CSS, support variables and mixins, transpile future CSS syntax, inline images, and more.

PostCSS is used by industry leaders including Wikipedia, Twitter, Alibaba, and JetBrains. The Autoprefixer PostCSS plugin is one of the most popular CSS processors.

Plugins

Troubleshooting

Without from option PostCSS could generate wrong source map and will not find Browserslist config

11ty와 vite, tailwind를 연결하는 도중 문제 발견. 전체 문구는 다음과 같다:

Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.

내용 그대로 이다. 'from' 옵션이 없으면 PostCSS는 잘못된 소스 맵을 생성할 수 있으며 Browserslist 구성을 찾지 못할 수 있습니다.

이 경고를 방지하려면 "CSS 파일 경로"를 지정하거나 또는 undefined로 설정하면 된다.

postcss( any_plugins ).process( css )

to

postcss( any_plugins ).process( css, { from: undefined } )

See also

  • PostCSS - PostCSS는 일상적인 CSS 동작을 자동화하기 위해 자바스크립트 기반 플러그인을 사용하는 소프트웨어 개발 도구이다.
  • PurgeCSS - 사용 안하는 CSS 찾아서 삭제해주는 도구

Favorite site