UNPKG

761 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.esbuildPlugin = void 0;
4function requirePlugin() {
5 try {
6 const path = require.resolve('@web/dev-server-esbuild', { paths: [__dirname, process.cwd()] });
7 return require(path);
8 }
9 catch (error) {
10 if (error.code === 'MODULE_NOT_FOUND') {
11 throw new Error('You need to add @web/dev-server-esbuild as a dependency of your project to use the esbuild flags.');
12 }
13 else {
14 throw error;
15 }
16 }
17}
18function esbuildPlugin(target) {
19 const pluginModule = requirePlugin();
20 return pluginModule.esbuildPlugin({ target });
21}
22exports.esbuildPlugin = esbuildPlugin;
23//# sourceMappingURL=esbuildPlugin.js.map
\No newline at end of file