UNPKG

turbopack-code-inspector-plugin

Version:

Click the dom on the page, it will open your IDE and position the cursor to the source code location of the dom.

43 lines (42 loc) 1.26 kB
var p = Object.defineProperty, d = Object.defineProperties; var l = Object.getOwnPropertyDescriptors; var s = Object.getOwnPropertySymbols; var u = Object.prototype.hasOwnProperty, a = Object.prototype.propertyIsEnumerable; var n = (e, r, o) => r in e ? p(e, r, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[r] = o, t = (e, r) => { for (var o in r || (r = {})) u.call(r, o) && n(e, o, r[o]); if (s) for (var o of s(r)) a.call(r, o) && n(e, o, r[o]); return e; }, c = (e, r) => d(e, l(r)); import { isDev as i } from "code-inspector-core"; function m(e) { const r = { port: 0, entry: "", output: e.output }; return e.close || !i(e.dev, process.env.NODE_ENV === "development") ? {} : { "**/*.{jsx,tsx,js,ts,mjs,mts}": { loaders: [ t({ loader: "webpack-code-inspector-plugin/dist/loader.js", options: c(t({}, e), { record: r }) }, e.enforcePre === !1 ? {} : { enforce: "pre" }), { loader: "webpack-code-inspector-plugin/dist/inject-loader.js", options: c(t({}, e), { record: r }), enforce: "pre" } ] } }; } export { m as TurbopackCodeInspectorPlugin };