remove sourceMap

This commit is contained in:
Harvey Zack committed 2025-04-21 09:10:21 +08:00
1 parent c3343ad74f
commit ab06749c15
105 files changed
+1665 -12149

No files matched your search

+2 -7
View File
@@ -46,7 +46,7 @@ async function build(name, targetName) {
esm: {
context: 'browser',
distDir: path.join(projects[name], 'dist'),
sourceMap: true,
sourceMap: false,
outputFormat: 'esmodule',
isLibrary: true,
engines: {
@@ -96,12 +96,7 @@ async function build(name, targetName) {
const newFilePath = path.join(projects[name], `dist/${names[targetName]}.js`);
const code = fs.readFileSync(filePath, 'utf-8');
if (targetName === 'esm') {
fs.writeFileSync(filePath, banner + '\n' + code);
} else {
fs.writeFileSync(filePath, banner + compressString(code));
}
fs.writeFileSync(filePath, banner + compressString(code));
fs.renameSync(filePath, newFilePath);
await cpy(newFilePath, compiledPath);
const size = fs.statSync(newFilePath).size / 1024;