@vuebro/loader-sfc 2.2.2 → 2.2.3

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.
@@ -21,7 +21,7 @@ const fetchText = async (url) => {
21
21
  };
22
22
  /* -------------------------------------------------------------------------- */
23
23
  export default async (filename, options) => {
24
- const styleErrors = [], { compiler: { expressionPlugins, ...restCompilerOptions } = {} } = options ?? {}, { descriptor, errors: parseErrors } = parse((await (await fetchText(filename)).text()) || "<template></template>", options?.parse), { script, scriptSetup, slotted, styles, template } = descriptor;
24
+ const styleErrors = [], { descriptor, errors: parseErrors } = parse((await (await fetchText(filename)).text()) || "<template></template>", options?.parse), { script, scriptSetup, slotted, styles, template } = descriptor, { template: { compilerOptions: { expressionPlugins, ...restCompilerOptions } = {}, ...restTemplateOptions } = {}, } = options ?? {};
25
25
  let moduleWarning = "";
26
26
  const id = `data-v-${hash(filename)}`, langs = new Set([script, scriptSetup].flatMap((scriptBlock) => {
27
27
  const { lang = "js" } = scriptBlock ?? {};
@@ -40,6 +40,7 @@ export default async (filename, options) => {
40
40
  compilerOptions,
41
41
  scoped,
42
42
  slotted,
43
+ ...restTemplateOptions,
43
44
  }, scriptOptions = {
44
45
  id,
45
46
  templateOptions,
@@ -78,7 +79,6 @@ export default async (filename, options) => {
78
79
  id,
79
80
  source,
80
81
  ...templateOptions,
81
- ...options?.template,
82
82
  })
83
83
  : {};
84
84
  const [styleResult, scriptResult, templateResult] = await Promise.all([
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.2",
24
+ "version": "2.2.3",
25
25
  "type": "module",
26
26
  "main": "./dist/loader-sfc.js",
27
27
  "types": "./dist/loader-sfc.d.ts",