Skip to content

Commit

Permalink
Merge pull request #107 from trygveaa/fix/support-pcss-extension
Browse files Browse the repository at this point in the history
fix: support files with a .pcss extension
  • Loading branch information
activeguild authored Dec 24, 2024
2 parents b495d84 + c2eec52 commit 920e7ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const parseCss = async (

const options = getPreprocessorOptions(config)
const resolveFn = config.createResolver({
extensions: ['.scss', '.sass', '.css'],
extensions: ['.scss', '.sass', '.pcss', '.css'],
mainFields: ['sass', 'style'],
tryIndex: true,
tryPrefix: '_',
Expand Down
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'node:path'
import type { Exception } from 'sass-embedded'

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

1 comment on commit 920e7ff

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bundled size for the package is listed below:

dist: 46.88 KB

Please sign in to comment.