Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Commit d1332af

Browse files
committed
feat: pass on postcss options to compiler-sfc
1 parent a22863f commit d1332af

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: src/index.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ export interface Options {
4646
transformAssetUrls?: SFCTemplateCompileOptions['transformAssetUrls']
4747

4848
// sfc style options
49-
preprocessCustomRequire?: SFCAsyncStyleCompileOptions['preprocessCustomRequire']
49+
postcssOptions?: SFCAsyncStyleCompileOptions['postcssOptions']
50+
postcssPlugins?: SFCAsyncStyleCompileOptions['postcssPlugins']
5051
cssModulesOptions?: SFCAsyncStyleCompileOptions['modulesOptions']
52+
preprocessCustomRequire?: SFCAsyncStyleCompileOptions['preprocessCustomRequire']
5153
preprocessOptions?: SFCAsyncStyleCompileOptions['preprocessOptions']
5254
}
5355

@@ -187,6 +189,8 @@ export default function PluginVue(userOptions: Partial<Options> = {}): Plugin {
187189
source: code,
188190
scoped: block.scoped,
189191
modules: !!block.module,
192+
postcssOptions: options.postcssOptions,
193+
postcssPlugins: options.postcssPlugins,
190194
modulesOptions: options.cssModulesOptions,
191195
preprocessLang: options.preprocessStyles
192196
? (block.lang as any)

0 commit comments

Comments
 (0)