mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
fix: 使用 cdn combo 服务时, 最后一行的 //# sourceMappingURL=engine-core.js.map 导致后面内容都被注释
This commit is contained in:
parent
bedd598fc7
commit
8da27d973f
@ -13,7 +13,7 @@
|
||||
"start": "build-scripts start",
|
||||
"version:update": "node ./scripts/version.js",
|
||||
"build": "build-scripts build --skip-demo",
|
||||
"cloud-build": "build-scripts build --config build.cloud.json && tnpm run version:update",
|
||||
"cloud-build": "build-scripts build --config build.cloud.json && tnpm run version:update && node ./scripts/add-blank-line.js",
|
||||
"test": "build-scripts test --config build.test.json"
|
||||
},
|
||||
"license": "MIT",
|
||||
|
||||
19
packages/engine/scripts/add-blank-line.js
Normal file
19
packages/engine/scripts/add-blank-line.js
Normal file
@ -0,0 +1,19 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||
const { join } = require('path');
|
||||
const fse = require('fs-extra');
|
||||
|
||||
|
||||
const distDir = join(__dirname, '../dist');
|
||||
|
||||
const distFileNames = ['engine.js', 'engine-core.js'];
|
||||
|
||||
distFileNames.forEach(name => {
|
||||
const distFile = join(distDir, 'js', name);
|
||||
|
||||
const indexContent = fse.readFileSync(distFile, 'utf-8') + '\n';
|
||||
|
||||
fse.writeFileSync(distFile, indexContent);
|
||||
});
|
||||
|
||||
console.log('[engine] add a blank line successfully!');
|
||||
Loading…
x
Reference in New Issue
Block a user