Skip to content

Commit

Permalink
fix(plugin-vue): pass on script and style options to compiler-sfc
Browse files Browse the repository at this point in the history
fix #1450
  • Loading branch information
yyx990803 committed Jan 9, 2021
1 parent 9b19dcf commit 0ec86cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/plugin-vue/src/script.ts
Expand Up @@ -38,6 +38,7 @@ export function resolveScript(
let resolved: SFCScriptBlock | null = null

resolved = compileScript(descriptor, {
...options.script,
id: descriptor.id,
isProd: options.isProduction,
inlineTemplate: !options.devServer,
Expand Down
1 change: 1 addition & 0 deletions packages/plugin-vue/src/style.ts
Expand Up @@ -13,6 +13,7 @@ export async function transformStyle(
// vite already handles pre-processors and CSS module so this is only
// applying SFC-specific transforms like scoped mode and CSS vars rewrite (v-bind(var))
const result = await compileStyleAsync({
...options.style,
filename: descriptor.filename,
id: `data-v-${descriptor.id}`,
isProd: options.isProduction,
Expand Down

0 comments on commit 0ec86cc

Please sign in to comment.