@prosopo/config 3.3.4 → 3.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build$colon$cjs.log +27 -24
- package/.turbo/turbo-build$colon$tsc.log +4 -4
- package/.turbo/turbo-build.log +28 -24
- package/CHANGELOG.md +32 -0
- package/dist/_virtual/_rolldown/runtime.js +3 -0
- package/dist/cjs/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/cjs/dependencies.cjs +130 -137
- package/dist/cjs/index.cjs +31 -32
- package/dist/cjs/vite/TsNoCheckPlugin.cjs +11 -15
- package/dist/cjs/vite/index.cjs +26 -26
- package/dist/cjs/vite/vite-plugin-close-and-copy.cjs +42 -42
- package/dist/cjs/vite/vite-plugin-copy.cjs +39 -38
- package/dist/cjs/vite/vite-plugin-externalize-obfuscator-deadcode.cjs +25 -0
- package/dist/cjs/vite/vite-plugin-fix-absolute-imports.cjs +16 -24
- package/dist/cjs/vite/vite-plugin-remove-unused-translations.cjs +53 -74
- package/dist/cjs/vite/vite-plugin-sourcemap-exclude.cjs +12 -15
- package/dist/cjs/vite/vite.backend.config.cjs +87 -104
- package/dist/cjs/vite/vite.commonjs.config.cjs +69 -74
- package/dist/cjs/vite/vite.esm.config.cjs +71 -70
- package/dist/cjs/vite/vite.frontend.config.cjs +173 -210
- package/dist/cjs/vite/vite.test.config.cjs +70 -80
- package/dist/cjs/vite/vite.threads.test.config.cjs +67 -78
- package/dist/cjs/webpack/index.cjs +0 -2
- package/dist/cjs/webpack/webpack.config.cjs +108 -146
- package/dist/dependencies.d.ts.map +1 -1
- package/dist/dependencies.js +123 -138
- package/dist/dependencies.js.map +1 -1
- package/dist/index.js +14 -31
- package/dist/vite/TsNoCheckPlugin.js +12 -16
- package/dist/vite/index.d.ts +1 -0
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +13 -25
- package/dist/vite/index.js.map +1 -1
- package/dist/vite/vite-plugin-close-and-copy.js +37 -41
- package/dist/vite/vite-plugin-copy.js +32 -36
- package/dist/vite/vite-plugin-externalize-obfuscator-deadcode.d.ts +3 -0
- package/dist/vite/vite-plugin-externalize-obfuscator-deadcode.d.ts.map +1 -0
- package/dist/vite/vite-plugin-externalize-obfuscator-deadcode.js +25 -0
- package/dist/vite/vite-plugin-externalize-obfuscator-deadcode.js.map +1 -0
- package/dist/vite/vite-plugin-fix-absolute-imports.js +15 -24
- package/dist/vite/vite-plugin-remove-unused-translations.js +50 -76
- package/dist/vite/vite-plugin-sourcemap-exclude.js +12 -16
- package/dist/vite/vite.backend.config.d.ts.map +1 -1
- package/dist/vite/vite.backend.config.js +80 -101
- package/dist/vite/vite.backend.config.js.map +1 -1
- package/dist/vite/vite.commonjs.config.d.ts.map +1 -1
- package/dist/vite/vite.commonjs.config.js +61 -71
- package/dist/vite/vite.commonjs.config.js.map +1 -1
- package/dist/vite/vite.esm.config.d.ts.map +1 -1
- package/dist/vite/vite.esm.config.js +63 -67
- package/dist/vite/vite.esm.config.js.map +1 -1
- package/dist/vite/vite.frontend.config.d.ts.map +1 -1
- package/dist/vite/vite.frontend.config.js +158 -202
- package/dist/vite/vite.frontend.config.js.map +1 -1
- package/dist/vite/vite.test.config.d.ts.map +1 -1
- package/dist/vite/vite.test.config.js +63 -78
- package/dist/vite/vite.test.config.js.map +1 -1
- package/dist/vite/vite.threads.test.config.d.ts.map +1 -1
- package/dist/vite/vite.threads.test.config.js +61 -76
- package/dist/vite/vite.threads.test.config.js.map +1 -1
- package/dist/webpack/index.js +1 -1
- package/dist/webpack/webpack.config.d.ts +2 -0
- package/dist/webpack/webpack.config.d.ts.map +1 -1
- package/dist/webpack/webpack.config.js +96 -119
- package/dist/webpack/webpack.config.js.map +1 -1
- package/package.json +9 -9
- package/src/dependencies.ts +15 -2
- package/src/vite/index.ts +1 -0
- package/src/vite/vite-plugin-externalize-obfuscator-deadcode.ts +43 -0
- package/src/vite/vite.backend.config.ts +19 -2
- package/src/vite/vite.commonjs.config.ts +2 -0
- package/src/vite/vite.esm.config.ts +12 -0
- package/src/vite/vite.frontend.config.ts +19 -8
- package/src/vite/vite.test.config.ts +15 -10
- package/src/vite/vite.threads.test.config.ts +6 -9
- package/src/webpack/webpack.config.ts +8 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/vite.cjs.config.ts +4 -0
- package/vite.esm.config.ts +9 -1
- package/.turbo/turbo-typecheck.log +0 -4
|
@@ -1,105 +1,88 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
rollupOptions: {
|
|
87
|
-
treeshake: "smallest",
|
|
88
|
-
external: allExternal,
|
|
89
|
-
watch: false,
|
|
90
|
-
output: {
|
|
91
|
-
entryFileNames: `${bundleName}.[name].bundle.js`
|
|
92
|
-
},
|
|
93
|
-
// biome-ignore lint/suspicious/noExplicitAny: has to be any to represent object prototype
|
|
94
|
-
plugins: [css(), pluginWasm.wasm()]
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
plugins: [
|
|
98
|
-
// plugin to replace stuff like import blah from string_encoder/lib/string_encoder.js with import blah from string_encoder
|
|
99
|
-
vitePluginFixAbsoluteImports(),
|
|
100
|
-
// plugin to close the bundle after build if not in serve mode
|
|
101
|
-
command !== "serve" ? vitePluginCloseAndCopy() : void 0
|
|
102
|
-
]
|
|
103
|
-
};
|
|
1
|
+
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_vite_plugin_close_and_copy = require("./vite-plugin-close-and-copy.cjs");
|
|
3
|
+
const require_vite_plugin_externalize_obfuscator_deadcode = require("./vite-plugin-externalize-obfuscator-deadcode.cjs");
|
|
4
|
+
const require_dependencies = require("../dependencies.cjs");
|
|
5
|
+
const require_vite_plugin_fix_absolute_imports = require("./vite-plugin-fix-absolute-imports.cjs");
|
|
6
|
+
let node_path = require("node:path");
|
|
7
|
+
node_path = require_runtime.__toESM(node_path, 1);
|
|
8
|
+
let node_module = require("node:module");
|
|
9
|
+
let _rollup_plugin_wasm = require("@rollup/plugin-wasm");
|
|
10
|
+
let rollup_plugin_import_css = require("rollup-plugin-import-css");
|
|
11
|
+
rollup_plugin_import_css = require_runtime.__toESM(rollup_plugin_import_css, 1);
|
|
12
|
+
//#region src/vite/vite.backend.config.ts
|
|
13
|
+
async function vite_backend_config_default(packageName, packageVersion, bundleName, packageDir, entry, command, mode, outputDir) {
|
|
14
|
+
const isProduction = mode === "production";
|
|
15
|
+
const { dependencies: deps, optionalPeerDependencies } = await require_dependencies.getDependencies(packageName, true);
|
|
16
|
+
const outDir = outputDir ? node_path.default.resolve(outputDir) : node_path.default.resolve(packageDir, "dist/bundle");
|
|
17
|
+
const { external, internal } = require_dependencies.filterDependencies(deps, [
|
|
18
|
+
"aws",
|
|
19
|
+
"webpack",
|
|
20
|
+
"vite",
|
|
21
|
+
"biome"
|
|
22
|
+
]);
|
|
23
|
+
const allExternal = [
|
|
24
|
+
...node_module.builtinModules.filter((m) => m !== "punycode"),
|
|
25
|
+
...node_module.builtinModules.map((m) => `node:${m}`),
|
|
26
|
+
...external,
|
|
27
|
+
...optionalPeerDependencies
|
|
28
|
+
];
|
|
29
|
+
console.info(`Bundling. ${JSON.stringify(internal.slice(0, 10), null, 2)}... ${internal.length} deps`);
|
|
30
|
+
const define = {
|
|
31
|
+
"process.env.WS_NO_BUFFER_UTIL": "true",
|
|
32
|
+
"process.env.WS_NO_UTF_8_VALIDATE": "true",
|
|
33
|
+
"process.env.PROSOPO_PACKAGE_VERSION": JSON.stringify(packageVersion),
|
|
34
|
+
"process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV || mode),
|
|
35
|
+
...process.env.PROSOPO_DEFAULT_ENVIRONMENT && { "process.env.PROSOPO_DEFAULT_ENVIRONMENT": JSON.stringify(process.env.PROSOPO_DEFAULT_ENVIRONMENT) }
|
|
36
|
+
};
|
|
37
|
+
console.info(`Defined vars ${JSON.stringify(define, null, 2)}`);
|
|
38
|
+
let entriesAbsolute;
|
|
39
|
+
if (typeof entry === "string") entriesAbsolute = [node_path.default.resolve(packageDir, entry)];
|
|
40
|
+
else if (Array.isArray(entry)) entriesAbsolute = entry.map((e) => node_path.default.resolve(packageDir, e));
|
|
41
|
+
else entriesAbsolute = Object.fromEntries(Object.entries(entry).map(([key, value]) => [key, node_path.default.resolve(packageDir, value)]));
|
|
42
|
+
return {
|
|
43
|
+
ssr: {
|
|
44
|
+
noExternal: true,
|
|
45
|
+
external: allExternal
|
|
46
|
+
},
|
|
47
|
+
optimizeDeps: {
|
|
48
|
+
include: ["linked-dep", "node_modules"],
|
|
49
|
+
esbuildOptions: { loader: { ".node": "file" } }
|
|
50
|
+
},
|
|
51
|
+
esbuild: {
|
|
52
|
+
platform: "node",
|
|
53
|
+
target: "node24",
|
|
54
|
+
legalComments: "none"
|
|
55
|
+
},
|
|
56
|
+
define,
|
|
57
|
+
build: {
|
|
58
|
+
outDir,
|
|
59
|
+
minify: isProduction,
|
|
60
|
+
ssr: true,
|
|
61
|
+
target: "node24",
|
|
62
|
+
lib: {
|
|
63
|
+
entry: entriesAbsolute,
|
|
64
|
+
name: bundleName,
|
|
65
|
+
fileName: `${bundleName}.[name].bundle.js`,
|
|
66
|
+
formats: ["es"]
|
|
67
|
+
},
|
|
68
|
+
modulePreload: { polyfill: false },
|
|
69
|
+
rollupOptions: {
|
|
70
|
+
treeshake: {
|
|
71
|
+
annotations: true,
|
|
72
|
+
moduleSideEffects: true
|
|
73
|
+
},
|
|
74
|
+
external: allExternal,
|
|
75
|
+
watch: false,
|
|
76
|
+
output: { entryFileNames: `${bundleName}.[name].bundle.js` },
|
|
77
|
+
plugins: [(0, rollup_plugin_import_css.default)(), (0, _rollup_plugin_wasm.wasm)()]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
plugins: [
|
|
81
|
+
require_vite_plugin_externalize_obfuscator_deadcode.default(),
|
|
82
|
+
require_vite_plugin_fix_absolute_imports.default(),
|
|
83
|
+
command !== "serve" ? require_vite_plugin_close_and_copy.default() : void 0
|
|
84
|
+
]
|
|
85
|
+
};
|
|
104
86
|
}
|
|
105
|
-
|
|
87
|
+
//#endregion
|
|
88
|
+
exports.default = vite_backend_config_default;
|
|
@@ -1,75 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
jsx: "automatic",
|
|
69
|
-
// Use standard React JSX for library packages
|
|
70
|
-
// Frontend apps using ViteFrontendConfig will override to Emotion
|
|
71
|
-
jsxDev: process.env.NODE_ENV === "development"
|
|
72
|
-
}
|
|
73
|
-
});
|
|
1
|
+
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_vite_plugin_close_and_copy = require("./vite-plugin-close-and-copy.cjs");
|
|
3
|
+
const require_vite_plugin_externalize_obfuscator_deadcode = require("./vite-plugin-externalize-obfuscator-deadcode.cjs");
|
|
4
|
+
const require_dependencies = require("../dependencies.cjs");
|
|
5
|
+
const require_vite_plugin_copy = require("./vite-plugin-copy.cjs");
|
|
6
|
+
let node_path = require("node:path");
|
|
7
|
+
node_path = require_runtime.__toESM(node_path, 1);
|
|
8
|
+
let vite_tsconfig_paths = require("vite-tsconfig-paths");
|
|
9
|
+
vite_tsconfig_paths = require_runtime.__toESM(vite_tsconfig_paths, 1);
|
|
10
|
+
let node_module = require("node:module");
|
|
11
|
+
let vite = require("vite");
|
|
12
|
+
let vite_plugin_no_bundle = require("vite-plugin-no-bundle");
|
|
13
|
+
vite_plugin_no_bundle = require_runtime.__toESM(vite_plugin_no_bundle, 1);
|
|
14
|
+
//#region src/vite/vite.commonjs.config.ts
|
|
15
|
+
async function vite_commonjs_config_default(name, tsConfigPath, entry) {
|
|
16
|
+
console.info(`ViteCommonJSConfig: ${name}`);
|
|
17
|
+
const projectExternal = await require_dependencies.getExternalsFromReferences(tsConfigPath, [/dev/]);
|
|
18
|
+
const allExternal = [
|
|
19
|
+
...node_module.builtinModules,
|
|
20
|
+
...node_module.builtinModules.map((m) => `node:${m}`),
|
|
21
|
+
...projectExternal
|
|
22
|
+
];
|
|
23
|
+
return (0, vite.defineConfig)({
|
|
24
|
+
ssr: { external: allExternal },
|
|
25
|
+
plugins: [
|
|
26
|
+
require_vite_plugin_externalize_obfuscator_deadcode.default(),
|
|
27
|
+
{
|
|
28
|
+
name: "string-replace-require('url').pathToFileURL(__filename).href",
|
|
29
|
+
generateBundle(_, bundle) {
|
|
30
|
+
for (const fileName in bundle) {
|
|
31
|
+
const chunk = bundle[fileName];
|
|
32
|
+
if (chunk && chunk.type === "chunk" && "code" in chunk && chunk.code) chunk.code = chunk.code.replace(/import\.meta\.url/g, "require('url').pathToFileURL(__filename).href");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
(0, vite_plugin_no_bundle.default)({
|
|
37
|
+
root: "src",
|
|
38
|
+
copy: "**/*.css"
|
|
39
|
+
}),
|
|
40
|
+
require_vite_plugin_copy.default({
|
|
41
|
+
srcDir: "src",
|
|
42
|
+
destDir: "dist",
|
|
43
|
+
include: ["**/*.json"]
|
|
44
|
+
}),
|
|
45
|
+
(0, vite_tsconfig_paths.default)({ projects: [node_path.default.resolve(tsConfigPath)] }),
|
|
46
|
+
require_vite_plugin_close_and_copy.default()
|
|
47
|
+
],
|
|
48
|
+
build: {
|
|
49
|
+
emptyOutDir: false,
|
|
50
|
+
ssr: true,
|
|
51
|
+
target: "node24",
|
|
52
|
+
outDir: "dist/cjs",
|
|
53
|
+
lib: {
|
|
54
|
+
name,
|
|
55
|
+
formats: ["cjs"],
|
|
56
|
+
entry: entry || "src/index.ts"
|
|
57
|
+
},
|
|
58
|
+
rollupOptions: {
|
|
59
|
+
treeshake: false,
|
|
60
|
+
external: allExternal
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
esbuild: {
|
|
64
|
+
jsx: "automatic",
|
|
65
|
+
jsxDev: process.env.NODE_ENV === "development"
|
|
66
|
+
}
|
|
67
|
+
});
|
|
74
68
|
}
|
|
75
|
-
|
|
69
|
+
//#endregion
|
|
70
|
+
exports.default = vite_commonjs_config_default;
|
|
@@ -1,71 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
1
|
+
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_vite_plugin_close_and_copy = require("./vite-plugin-close-and-copy.cjs");
|
|
3
|
+
const require_vite_plugin_externalize_obfuscator_deadcode = require("./vite-plugin-externalize-obfuscator-deadcode.cjs");
|
|
4
|
+
const require_dependencies = require("../dependencies.cjs");
|
|
5
|
+
const require_vite_plugin_copy = require("./vite-plugin-copy.cjs");
|
|
6
|
+
let node_path = require("node:path");
|
|
7
|
+
node_path = require_runtime.__toESM(node_path, 1);
|
|
8
|
+
let vite_tsconfig_paths = require("vite-tsconfig-paths");
|
|
9
|
+
vite_tsconfig_paths = require_runtime.__toESM(vite_tsconfig_paths, 1);
|
|
10
|
+
let node_module = require("node:module");
|
|
11
|
+
let vite = require("vite");
|
|
12
|
+
let vite_plugin_no_bundle = require("vite-plugin-no-bundle");
|
|
13
|
+
vite_plugin_no_bundle = require_runtime.__toESM(vite_plugin_no_bundle, 1);
|
|
14
|
+
//#region src/vite/vite.esm.config.ts
|
|
15
|
+
async function vite_esm_config_default(name, tsConfigPath, entry) {
|
|
16
|
+
console.info(`ViteEsmConfig: ${name}`);
|
|
17
|
+
const projectExternal = await require_dependencies.getExternalsFromReferences(tsConfigPath, [/dev/]);
|
|
18
|
+
const allExternal = [
|
|
19
|
+
...node_module.builtinModules,
|
|
20
|
+
...node_module.builtinModules.map((m) => `node:${m}`),
|
|
21
|
+
...projectExternal,
|
|
22
|
+
"html-webpack-plugin",
|
|
23
|
+
"mini-css-extract-plugin",
|
|
24
|
+
"node-polyfill-webpack-plugin",
|
|
25
|
+
"terser-webpack-plugin",
|
|
26
|
+
"webpack",
|
|
27
|
+
"webpack-dev-server",
|
|
28
|
+
"webpack-json-access-optimizer",
|
|
29
|
+
"babel-loader",
|
|
30
|
+
"css-loader",
|
|
31
|
+
"string-replace-loader"
|
|
32
|
+
];
|
|
33
|
+
return (0, vite.defineConfig)({
|
|
34
|
+
ssr: { external: allExternal },
|
|
35
|
+
plugins: [
|
|
36
|
+
require_vite_plugin_externalize_obfuscator_deadcode.default(),
|
|
37
|
+
(0, vite_plugin_no_bundle.default)({
|
|
38
|
+
root: "src",
|
|
39
|
+
copy: "**/*.css"
|
|
40
|
+
}),
|
|
41
|
+
require_vite_plugin_copy.default({
|
|
42
|
+
srcDir: "src",
|
|
43
|
+
destDir: "dist",
|
|
44
|
+
include: ["**/*.json"]
|
|
45
|
+
}),
|
|
46
|
+
(0, vite_tsconfig_paths.default)({ projects: [node_path.default.resolve(tsConfigPath)] }),
|
|
47
|
+
require_vite_plugin_close_and_copy.default()
|
|
48
|
+
],
|
|
49
|
+
build: {
|
|
50
|
+
emptyOutDir: false,
|
|
51
|
+
ssr: true,
|
|
52
|
+
target: "node24",
|
|
53
|
+
outDir: "dist",
|
|
54
|
+
lib: {
|
|
55
|
+
name,
|
|
56
|
+
formats: ["es"],
|
|
57
|
+
entry: entry || "src/index.ts"
|
|
58
|
+
},
|
|
59
|
+
rollupOptions: {
|
|
60
|
+
treeshake: false,
|
|
61
|
+
external: allExternal,
|
|
62
|
+
output: { polyfillRequire: false }
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
esbuild: {
|
|
66
|
+
jsx: "automatic",
|
|
67
|
+
jsxDev: process.env.NODE_ENV === "development"
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
//#endregion
|
|
72
|
+
exports.default = vite_esm_config_default;
|