diff --git a/packages/compiler-sfc/src/compileStyle.ts b/packages/compiler-sfc/src/compileStyle.ts index b61c46f3..25b8d419 100644 --- a/packages/compiler-sfc/src/compileStyle.ts +++ b/packages/compiler-sfc/src/compileStyle.ts @@ -5,7 +5,8 @@ import scopedPlugin from './stylePluginScoped' import { processors, StylePreprocessor, - StylePreprocessorResults + StylePreprocessorResults, + PreprocessLang } from './stylePreprocessors' export interface StyleCompileOptions { @@ -15,7 +16,7 @@ export interface StyleCompileOptions { map?: object scoped?: boolean trim?: boolean - preprocessLang?: string + preprocessLang?: PreprocessLang preprocessOptions?: any postcssOptions?: any postcssPlugins?: any[] diff --git a/packages/compiler-sfc/src/stylePreprocessors.ts b/packages/compiler-sfc/src/stylePreprocessors.ts index e391c6b7..2c7b3702 100644 --- a/packages/compiler-sfc/src/stylePreprocessors.ts +++ b/packages/compiler-sfc/src/stylePreprocessors.ts @@ -104,7 +104,9 @@ const styl: StylePreprocessor = { } } -export const processors: Record = { +export type PreprocessLang = 'less' | 'sass' | 'scss' | 'styl' | 'stylus' + +export const processors: Record = { less, sass, scss,