Skip to content

Commit

Permalink
fix: exclude css module by default, close #30
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Nov 11, 2023
1 parent ea04502 commit 5f24bb9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ import { createMarkdown } from './core/markdown'
import { resolveOptions } from './core/options'
import type { Options } from './types'

const cssIdRE = /\.(css|postcss|sass|scss|less|stylus|styl)($|\?)/

export const unpluginFactory: UnpluginFactory<Options> = (userOptions = {}) => {
const options = resolveOptions(userOptions)
const markdownToVue = createMarkdown(options)

const filter = createFilter(
userOptions.include || /\.md$|\.md\?vue/,
userOptions.exclude,
userOptions.exclude || cssIdRE,
)

return {
Expand Down

0 comments on commit 5f24bb9

Please sign in to comment.