mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-03 16:07:24 +00:00
refactor: 更优的方式处理文件末尾行注释的问题
This commit is contained in:
parent
5bfe7d9565
commit
4fb91ce33b
@ -23,7 +23,6 @@
|
|||||||
"outputDir": "dist",
|
"outputDir": "dist",
|
||||||
"vendor": false,
|
"vendor": false,
|
||||||
"ignoreHtmlTemplate": true,
|
"ignoreHtmlTemplate": true,
|
||||||
"sourceMap": true,
|
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"build-plugin-react-app",
|
"build-plugin-react-app",
|
||||||
["build-plugin-fusion", {
|
["build-plugin-fusion", {
|
||||||
|
|||||||
@ -19,5 +19,6 @@ module.exports = ({ onGetWebpackConfig }) => {
|
|||||||
*/
|
*/
|
||||||
config.plugins.delete('hot');
|
config.plugins.delete('hot');
|
||||||
config.devServer.hot(false);
|
config.devServer.hot(false);
|
||||||
|
config.devtool('hidden-source-map');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
"start": "build-scripts start",
|
"start": "build-scripts start",
|
||||||
"version:update": "node ./scripts/version.js",
|
"version:update": "node ./scripts/version.js",
|
||||||
"build": "build-scripts build --skip-demo",
|
"build": "build-scripts build --skip-demo",
|
||||||
"cloud-build": "build-scripts build --config build.cloud.json && tnpm run version:update && node ./scripts/add-blank-line.js",
|
"cloud-build": "build-scripts build --config build.cloud.json && tnpm run version:update",
|
||||||
"test": "build-scripts test --config build.test.json"
|
"test": "build-scripts test --config build.test.json"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@ -1,19 +0,0 @@
|
|||||||
/* 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!');
|
|
||||||
@ -23,7 +23,6 @@
|
|||||||
"outputDir": "dist",
|
"outputDir": "dist",
|
||||||
"vendor": false,
|
"vendor": false,
|
||||||
"ignoreHtmlTemplate": true,
|
"ignoreHtmlTemplate": true,
|
||||||
"sourceMap": true,
|
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"build-plugin-react-app",
|
"build-plugin-react-app",
|
||||||
["build-plugin-fusion", {
|
["build-plugin-fusion", {
|
||||||
|
|||||||
@ -19,5 +19,6 @@ module.exports = ({ onGetWebpackConfig }) => {
|
|||||||
*/
|
*/
|
||||||
config.plugins.delete('hot');
|
config.plugins.delete('hot');
|
||||||
config.devServer.hot(false);
|
config.devServer.hot(false);
|
||||||
|
config.devtool('hidden-source-map');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user