@sprlab/wccompiler 0.11.5 → 0.11.6
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.
- package/lib/compiler.js +3 -2
- package/package.json +1 -1
package/lib/compiler.js
CHANGED
|
@@ -118,11 +118,11 @@ async function compileSFC(filePath, config) {
|
|
|
118
118
|
const style = descriptor.style;
|
|
119
119
|
|
|
120
120
|
// 7. Extract lifecycle hooks (before other extractions)
|
|
121
|
-
const { onMountHooks, onDestroyHooks } = extractLifecycleHooks(source);
|
|
121
|
+
const { onMountHooks, onDestroyHooks, onAdoptHooks } = extractLifecycleHooks(source);
|
|
122
122
|
|
|
123
123
|
// 7b. Strip lifecycle/watcher blocks from source for extraction
|
|
124
124
|
let sourceForExtraction = source;
|
|
125
|
-
const hookLinePattern = /\bonMount\s*\(|\bonDestroy\s*\(|\bwatch\s*\(/;
|
|
125
|
+
const hookLinePattern = /\bonMount\s*\(|\bonDestroy\s*\(|\bonAdopt\s*\(|\bwatch\s*\(/;
|
|
126
126
|
const sourceLines = sourceForExtraction.split('\n');
|
|
127
127
|
const filteredLines = [];
|
|
128
128
|
let skipDepth = 0;
|
|
@@ -276,6 +276,7 @@ async function compileSFC(filePath, config) {
|
|
|
276
276
|
forBlocks: [],
|
|
277
277
|
onMountHooks,
|
|
278
278
|
onDestroyHooks,
|
|
279
|
+
onAdoptHooks,
|
|
279
280
|
modelBindings: [],
|
|
280
281
|
modelPropBindings: [],
|
|
281
282
|
attrBindings: [],
|
package/package.json
CHANGED