Skip to content

Commit f27aafa

Browse files
committed
chore(deps): upgrade
1 parent 23badf9 commit f27aafa

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

packages/config/src/defaults.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ import type { MangleUserConfig, PatchUserConfig, UserConfig } from './types'
22
import process from 'node:process'
33
import { defaultMangleClassFilter } from '@tailwindcss-mangle/shared'
44
import { CSS_LANGS_RE } from 'is-css-request'
5-
6-
const defaultPipelineInclude = ['**/*.{html,js,ts,jsx,tsx,vue,svelte,astro,elm,php,phtml,mdx,md}', CSS_LANGS_RE]
5+
// /\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/
6+
const defaultPipelineInclude = [
7+
/\.(html|js|ts|jsx|tsx|vue|svelte|astro|elm|php|phtml|mdx|md)(?:$|\?)/,
8+
CSS_LANGS_RE,
9+
]
710

811
const defaultPipelineExclude: string[] = []
912

packages/config/test/__snapshots__/defaults.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ exports[`defaults > getDefaultUserConfig 1`] = `
2323
"disabled": false,
2424
"exclude": [],
2525
"include": [
26-
"**/*.{html,js,ts,jsx,tsx,vue,svelte,astro,elm,php,phtml,mdx,md}",
26+
/\\\\\\.\\(html\\|js\\|ts\\|jsx\\|tsx\\|vue\\|svelte\\|astro\\|elm\\|php\\|phtml\\|mdx\\|md\\)\\(\\?:\\$\\|\\\\\\?\\)/,
2727
/\\\\\\.\\(css\\|less\\|sass\\|scss\\|styl\\|stylus\\|pcss\\|postcss\\|sss\\)\\(\\?:\\$\\|\\\\\\?\\)/,
2828
],
2929
"mangleClassFilter": [Function],

packages/config/test/__snapshots__/index.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ exports[`config > 2.mangle-options 1`] = `
1515
"disabled": false,
1616
"exclude": [],
1717
"include": [
18-
"**/*.{html,js,ts,jsx,tsx,vue,svelte,astro,elm,php,phtml,mdx,md}",
18+
/\\\\\\.\\(html\\|js\\|ts\\|jsx\\|tsx\\|vue\\|svelte\\|astro\\|elm\\|php\\|phtml\\|mdx\\|md\\)\\(\\?:\\$\\|\\\\\\?\\)/,
1919
/\\\\\\.\\(css\\|less\\|sass\\|scss\\|styl\\|stylus\\|pcss\\|postcss\\|sss\\)\\(\\?:\\$\\|\\\\\\?\\)/,
2020
],
2121
"mangleClassFilter": [Function],

packages/config/test/defaults.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { getDefaultPatchConfig, getDefaultUserConfig } from '@/defaults'
2+
import { createFilter } from '@rollup/pluginutils'
23
import { omit } from 'lodash-es'
34

45
function omitCwdPath(o: any) {
@@ -14,3 +15,11 @@ describe('defaults', () => {
1415
expect(omitCwdPath(getDefaultUserConfig())).toMatchSnapshot()
1516
})
1617
})
18+
19+
describe('createFilter', () => {
20+
it('case 0', () => {
21+
const config = getDefaultUserConfig()
22+
const filter = createFilter(config.mangle?.include, config.mangle?.exclude)
23+
expect(filter('xx/yy.js?a=1')).toBe(true)
24+
})
25+
})

0 commit comments

Comments
 (0)