Skip to content

Commit 920e7ff

Browse files
authoredDec 24, 2024··
Merge pull request #107 from trygveaa/fix/support-pcss-extension
fix: support files with a .pcss extension
2 parents b495d84 + c2eec52 commit 920e7ff

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎src/css.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const parseCss = async (
2424

2525
const options = getPreprocessorOptions(config)
2626
const resolveFn = config.createResolver({
27-
extensions: ['.scss', '.sass', '.css'],
27+
extensions: ['.scss', '.sass', '.pcss', '.css'],
2828
mainFields: ['sass', 'style'],
2929
tryIndex: true,
3030
tryPrefix: '_',

‎src/util.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import path from 'node:path'
22
import type { Exception } from 'sass-embedded'
33

4-
export const cssLangs = `\\.(css|sass|scss)($|\\?)`
4+
export const cssLangs = `\\.(css|pcss|sass|scss)($|\\?)`
55
export const cssLangReg = new RegExp(cssLangs)
66
export const cssModuleReg = new RegExp(`\\.module${cssLangs}`)
77
export const importCssRE = /@import ('[^']+\.css'|"[^"]+\.css"|[^'")]+\.css)/

1 commit comments

Comments
 (1)

github-actions[bot] commented on Dec 24, 2024

@github-actions[bot]

Bundled size for the package is listed below:

dist: 46.88 KB

Please sign in to comment.