Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

Add support PostCSS extensions (.sss, .pcss, .postcss) #438

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/next-css/index.js
Expand Up @@ -13,7 +13,7 @@ module.exports = (nextConfig = {}) => {
const { cssModules, cssLoaderOptions, postcssLoaderOptions } = nextConfig

options.defaultLoaders.css = cssLoaderConfig(config, {
extensions: ['css'],
extensions: ['css', 'sss', 'pcss', 'postcss'],
cssModules,
cssLoaderOptions,
postcssLoaderOptions,
Expand All @@ -22,7 +22,7 @@ module.exports = (nextConfig = {}) => {
})

config.module.rules.push({
test: /\.css$/,
test: /\.(c|s|pc|postc)ss$/,
issuer(issuer) {
if (issuer.match(/pages[\\/]_document\.js$/)) {
throw new Error(
Expand Down
2 changes: 1 addition & 1 deletion packages/next-css/package.json
Expand Up @@ -6,7 +6,7 @@
"repository": "zeit/next-plugins",
"dependencies": {
"css-loader": "^2.1.0",
"extract-css-chunks-webpack-plugin": "^3.3.2",
"extract-css-chunks-webpack-plugin": "3.3.2",
shashkovdanil marked this conversation as resolved.
Show resolved Hide resolved
"find-up": "^3.0.0",
"ignore-loader": "~0.1.2",
"optimize-css-assets-webpack-plugin": "^5.0.1",
Expand Down