UNPKG

dom-to-code

Version:
21 lines (17 loc) 725 B
'use strict'; const loaderUtils = require('loader-utils'); const index = require('./shared/dom-to-code.cf835144.cjs'); require('@babel/core'); require('magic-string'); require('./shared/dom-to-code.401158b7.cjs'); require('@vue/compiler-dom'); require('@vue/babel-plugin-jsx'); require('@babel/plugin-transform-typescript'); require('@babel/plugin-syntax-import-meta'); async function webpackLoader(source) { const { resourcePath } = this; const options = typeof this.getOptions === "function" ? this.getOptions() : loaderUtils.getOptions(this); const result = await index.transform(source, resourcePath, options); return typeof result === "string" ? result : result?.code || ""; } module.exports = webpackLoader;