|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
-
-
- var _chunkG75WOS6Pjs = require('./chunk-G75WOS6P.js');
-
- // src/index.ts
- var _unplugin = require('unplugin');
-
-
-
-
- var _common = require('@vue-macros/common');
- function resolveOption(options) {
- const version = options.version || _common.detectVueVersion.call(void 0, );
- return {
- include: [_common.REGEX_SETUP_SFC],
- ...options,
- version
- };
- }
- var name = "unplugin-vue-setup-sfc";
- var src_default = _unplugin.createUnplugin.call(void 0,
- (userOptions = {}) => {
- const options = resolveOption(userOptions);
- const filter = _common.createFilter.call(void 0, options);
- return {
- name,
- enforce: "pre",
- transformInclude(id) {
- return filter(id);
- },
- transform(code, id) {
- return _chunkG75WOS6Pjs.transformSetupSFC.call(void 0, code, id);
- },
- vite: {
- config() {
- return {
- esbuild: {
- exclude: options.include,
- include: options.exclude
- }
- };
- },
- handleHotUpdate: (ctx) => {
- if (filter(ctx.file)) {
- return _chunkG75WOS6Pjs.hotUpdateSetupSFC.call(void 0, ctx, filter);
- }
- }
- }
- };
- }
- );
-
-
-
- exports.src_default = src_default;
|