Skip to content

Commit 7a88a1c

Browse files
author
Franck Freiburger
committed
1 parent c2e8d74 commit 7a88a1c

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/createVue3SFCModule.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export async function createSFCModule(source : string, filename : AbstractPath,
6868

6969
const component : { [key: string]: any } = {};
7070

71-
const { delimiters, whitespace, moduleCache, compiledCache, getResource, addStyle, log, additionalBabelParserPlugins = [], additionalBabelPlugins = {}, customBlockHandler, devMode = false } = options;
71+
const { delimiters, whitespace, isCustomElement, moduleCache, compiledCache, getResource, addStyle, log, additionalBabelParserPlugins = [], additionalBabelPlugins = {}, customBlockHandler, devMode = false } = options;
7272

7373
// vue-loader next: https://github.com/vuejs/vue-loader/blob/next/src/index.ts#L91
7474
const { descriptor, errors } = sfc_parse(source, {
@@ -106,6 +106,7 @@ export async function createSFCModule(source : string, filename : AbstractPath,
106106
id: scopeId,
107107
slotted: descriptor.slotted,
108108
compilerOptions: {
109+
isCustomElement,
109110
whitespace,
110111
delimiters,
111112
scopeId: hasScoped ? scopeId : undefined,

src/types.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,16 @@ export type Options = {
256256
whitespace?: 'preserve' | 'condense',
257257

258258

259+
/**
260+
* Specifies a check method to recognize native custom elements.
261+
*
262+
* see. https://vuejs.org/api/application.html#app-config-compileroptions-iscustomelement
263+
* note: this option has no effect on vue2
264+
*/
265+
266+
isCustomElement : ((tag: string) => boolean) | undefined,
267+
268+
259269
/**
260270
* Additional babel parser plugins. [TBD]
261271
*

0 commit comments

Comments
 (0)