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

Commit d70f594

Browse files
committed
feat: support for new sfc experimental features
- new `<script setup>` vuejs/rfcs#227 - new `<style>` variable injection vuejs/rfcs#231 Requires a version of `@vue/compiler-sfc` that supports the above features.
1 parent df98a00 commit d70f594

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/script.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export function resolveScript(
3838
if (compileScript) {
3939
try {
4040
resolved = compileScript(descriptor, {
41+
// @ts-ignore
4142
id: scopeId,
4243
isProd,
4344
inlineTemplate: true,

src/style.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export async function transformStyle(
4949
const result = await compileStyleAsync({
5050
filename: query.filename,
5151
id: `data-v-${query.id}`,
52+
// @ts-ignore
5253
isProd: isProduction,
5354
source: code,
5455
scoped: block.scoped,

src/template.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export function transformTemplate(
2121
const descriptor = getDescriptor(query.filename)
2222
const result = compileTemplate({
2323
...getTemplateCompilerOptions(options, descriptor, query.id),
24-
id: query.id,
2524
source: code,
2625
filename: query.filename,
2726
})
@@ -73,6 +72,7 @@ export function getTemplateCompilerOptions(
7372
options.templatePreprocessOptions[preprocessLang]
7473
const resolvedScript = getResolvedScript(descriptor, isServer)
7574
return {
75+
// @ts-ignore
7676
id: scopeId,
7777
scoped: hasScoped,
7878
isProd,
@@ -83,6 +83,7 @@ export function getTemplateCompilerOptions(
8383
preprocessCustomRequire: options.preprocessCustomRequire,
8484
compiler: options.compiler,
8585
ssr: isServer,
86+
// @ts-ignore
8687
ssrCssVars: descriptor.cssVars,
8788
compilerOptions: {
8889
...options.compilerOptions,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy