Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,13 @@ function getSamplePathArray(samplesAr) {
}

gulp.task('tsbundle-new-window', function (done) {
var code = shelljs.exec('node --max-old-space-size=7168 ./node_modules/gulp/bin/gulp.js tsbundle');
if (code.code !== 0 || code.stderr) {
process.exit(1);
}
done();
shelljs.exec('node --max-old-space-size=7168 ./node_modules/gulp/bin/gulp.js tsbundle', {async: true}, function(code) {
if (code !== 0) {
console.error('tsbundle failed with exit code:', code);
process.exit(1);
}
done();
});
});

gulp.task('tsbundle', function (done) {
Expand All @@ -297,6 +299,16 @@ gulp.task('tsbundle', function (done) {

function bundles(platform, done) {
var webpackConfig = require(fs.realpathSync('./webpack.config.js'));

// Add memory-efficient webpack settings
webpackConfig.cache = {
type: 'filesystem',
cacheDirectory: './.webpack_cache',
buildDependencies: {
config: [__filename]
}
};

return gulp.src('.')
.pipe(webpackGulp(webpackConfig, webpack))
.pipe(gulp.dest('.'))
Expand Down Expand Up @@ -542,4 +554,4 @@ gulp.task('serve', function(done) {
};
bs.init(options, done);
});
});
});
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@
"devDependencies": {
"@syncfusion/ej2-react-notifications": "*",
"@types/chai": "^4.3.11",
"@types/codemirror": "^5.60.17",
"@types/crossroads": "^0.0.33",
"@types/hasher": "^0.0.35",
"@types/jasmine": "^5.1.4",
"@types/jasmine-ajax": "^3.3.5",
"@types/mocha": "^10.0.6",
"@types/node": "^14.18.63",
"@types/requirejs": "^2.1.37",
"aws-sdk": "2.1415.0",
"browser-sync": "2.29.3",
Expand Down Expand Up @@ -119,5 +123,8 @@
"build": "gulp build",
"serve": "gulp serve",
"test": "gulp test"
},
"overrides": {
"@types/node": "^14.18.63"
}
}
}
8 changes: 8 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ function getControlWiseBundle() {

module.exports = webpackConfig({
mode : 'development',
cache: {
type: 'filesystem',
cacheDirectory: './.webpack_cache',
buildDependencies: {
config: [__filename]
}
},
entry: {
'src/common/index.min': './src/common/index'
},
Expand Down Expand Up @@ -70,3 +77,4 @@ function webpackConfig(conf) {
}
return conf;
}