2024-08-04 08:28:19 +08:00
|
|
|
import { defineConfig, moduleTools } from '@modern-js/module-tools';
|
2024-07-23 16:25:11 +08:00
|
|
|
|
|
|
|
// It was split into two configuration files because of a bug in the build config array
|
|
|
|
export default defineConfig({
|
|
|
|
plugins: [moduleTools()],
|
|
|
|
buildConfig: {
|
2024-10-28 11:04:40 +08:00
|
|
|
platform: 'browser',
|
2024-07-23 16:25:11 +08:00
|
|
|
buildType: 'bundle',
|
|
|
|
format: 'iife',
|
2024-08-26 18:50:33 +08:00
|
|
|
dts: false,
|
2024-07-23 16:25:11 +08:00
|
|
|
input: {
|
2024-08-04 08:28:19 +08:00
|
|
|
htmlElement: 'src/extractor/index.ts',
|
2024-08-21 15:52:46 +08:00
|
|
|
htmlElementDebug: 'src/extractor/debug.ts',
|
2024-07-23 16:25:11 +08:00
|
|
|
},
|
2024-08-26 18:50:33 +08:00
|
|
|
autoExternal: false,
|
2024-07-23 16:25:11 +08:00
|
|
|
outDir: 'dist/script',
|
2024-08-04 08:28:19 +08:00
|
|
|
esbuildOptions: (options) => {
|
|
|
|
options.globalName = 'midscene_element_inspector';
|
2024-07-23 16:25:11 +08:00
|
|
|
return options;
|
|
|
|
},
|
2024-10-28 11:04:40 +08:00
|
|
|
target: 'es6',
|
2024-08-04 08:28:19 +08:00
|
|
|
},
|
2024-07-23 16:25:11 +08:00
|
|
|
});
|