|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
-
-
-
-
-
- var _chunkUJQOYP4Ujs = require('./chunk-UJQOYP4U.js');
-
- // src/index.ts
- var _unplugin = require('unplugin');
-
-
-
-
-
-
-
-
-
- var _common = require('@vue-macros/common');
- function resolveOption(options, framework) {
- const version = options.version || _common.detectVueVersion.call(void 0, );
- return {
- include: [_common.REGEX_SRC_FILE, _common.REGEX_VUE_SFC, _common.REGEX_SETUP_SFC].concat(
- version === 2 && framework === "webpack" ? _common.REGEX_VUE_SUB : []
- ),
- exclude: [_common.REGEX_NODE_MODULES],
- ...options,
- version
- };
- }
- var name = "unplugin-reactivity-transform";
- var src_default = _unplugin.createUnplugin.call(void 0,
- (userOptions = {}, { framework }) => {
- const options = resolveOption(userOptions, framework);
- const filter = _common.createFilter.call(void 0, options);
- return {
- name,
- enforce: "pre",
- resolveId(id) {
- if (id === _chunkUJQOYP4Ujs.helperId)
- return id;
- },
- loadInclude(id) {
- return id === _chunkUJQOYP4Ujs.helperId;
- },
- load(_id) {
- const id = _common.normalizePath.call(void 0, _id);
- if (id === _chunkUJQOYP4Ujs.helperId)
- return _chunkUJQOYP4Ujs.code_default;
- },
- transformInclude(id) {
- return filter(id);
- },
- transform(code, id) {
- if (_common.REGEX_VUE_SFC.test(id) || _common.REGEX_SETUP_SFC.test(id) || framework === "webpack" && _common.REGEX_VUE_SUB.test(id)) {
- return _chunkUJQOYP4Ujs.transformVueSFC.call(void 0, code, id);
- } else {
- if (!_chunkUJQOYP4Ujs.shouldTransform.call(void 0, code))
- return;
- return _chunkUJQOYP4Ujs.transform.call(void 0, code, {
- filename: id,
- sourceMap: true
- });
- }
- }
- };
- }
- );
-
-
-
- exports.src_default = src_default;
|