@vuebro/loader-sfc 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,8 @@
1
- import type { SFCAsyncStyleCompileOptions, SFCScriptCompileOptions, SFCTemplateCompileOptions } from "vue/compiler-sfc";
1
+ import type { CompilerOptions, SFCAsyncStyleCompileOptions, SFCScriptCompileOptions, SFCTemplateCompileOptions } from "vue/compiler-sfc";
2
2
  declare const _default: (filename: string, options?: {
3
- script?: SFCScriptCompileOptions;
4
- style?: SFCAsyncStyleCompileOptions;
5
- template?: SFCTemplateCompileOptions;
3
+ compiler?: Partial<CompilerOptions>;
4
+ script?: Partial<SFCScriptCompileOptions>;
5
+ style?: Partial<SFCAsyncStyleCompileOptions>;
6
+ template?: Partial<SFCTemplateCompileOptions>;
6
7
  }) => Promise<import("vue").ComponentOptions<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, any, any, any, string, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>>;
7
8
  export default _default;
@@ -23300,7 +23300,7 @@ const Ng = async (e) => {
23300
23300
  const f = `data-v-${ST(e)}`, T = new Set([o, c].flatMap((se) => {
23301
23301
  const { lang: xe = "js" } = se ?? {};
23302
23302
  return [.../[jt]sx$/.test(xe) ? ["jsx"] : [], .../tsx?$/.test(xe) ? ["typescript"] : []];
23303
- })), m = { expressionPlugins: [...T], scopeId: f, slotted: l }, y = p.some(({ scoped: se }) => se), v = y ? { __scopeId: f } : {}, b = { compilerOptions: m, scoped: y, slotted: l }, E = { id: f, inlineTemplate: !0, templateOptions: b, ...t?.script }, w = d && (!c || !E.inlineTemplate), C = document.getElementById(f) instanceof HTMLStyleElement ? Promise.resolve([]) : Promise.all(p.map(async ({ content: se, module: xe = !1, scoped: Q = !1, src: le }) => {
23303
+ })), m = { expressionPlugins: [...T], scopeId: f, slotted: l, ...t?.compiler }, y = p.some(({ scoped: se }) => se), v = y ? { __scopeId: f } : {}, b = { compilerOptions: m, scoped: y, slotted: l }, E = { id: f, templateOptions: b, ...t?.script }, w = d && (!c || !E.inlineTemplate), C = document.getElementById(f) instanceof HTMLStyleElement ? Promise.resolve([]) : Promise.all(p.map(async ({ content: se, module: xe = !1, scoped: Q = !1, src: le }) => {
23304
23304
  const { code: J, errors: $ } = await s_({ filename: e, id: f, scoped: Q, source: le ? await (await Ng(le)).text() : se, ...t?.style });
23305
23305
  return xe && !g && (g = Error("<style module> is not supported in the playground.")), s.push(...$), J;
23306
23306
  })), A = { jsxRuntime: "preserve", transforms: [...T] }, { ast: O, content: D = "" } = d ?? {}, { bindings: N, content: j, warnings: U } = o || c ? W_(n, E) : {};
@@ -33,13 +33,13 @@ export default async (filename, options) => {
33
33
  expressionPlugins: [...langs],
34
34
  scopeId: id,
35
35
  slotted,
36
+ ...options?.compiler,
36
37
  }, scoped = styles.some(({ scoped }) => scoped), component = scoped ? { __scopeId: id } : {}, templateOptions = {
37
38
  compilerOptions,
38
39
  scoped,
39
40
  slotted,
40
41
  }, scriptOptions = {
41
42
  id,
42
- inlineTemplate: true,
43
43
  templateOptions,
44
44
  ...options?.script,
45
45
  }, isCompileTemplate = template && (!scriptSetup || !scriptOptions.inlineTemplate), style = !(document.getElementById(id) instanceof HTMLStyleElement)
package/package.json CHANGED
@@ -21,7 +21,7 @@
21
21
  "url": "git+https://github.com/vuebro/loader-sfc.git"
22
22
  },
23
23
  "license": "AGPL-3.0-only",
24
- "version": "2.2.0",
24
+ "version": "2.2.1",
25
25
  "type": "module",
26
26
  "main": "./dist/loader-sfc.js",
27
27
  "types": "./dist/loader-sfc.d.ts",