Currently, I am developing a TypeScript Angular 2 application with gulp tasks. One of these tasks is gulp build
, which transpiles the code to JavaScript, bundles it, and minifies it. The other task is gulp build:dev
, which does the same thing but without the minifying and bundling.
I encountered an issue where commenting out a specific line in app.module.ts
:
import { ClipboardModule } from 'ngx-clipboard';
causes both gulp tasks to work properly. However, when I uncomment this line, neither of the gulp tasks generates any JavaScript output.
No error messages are being displayed, so I'm puzzled as to how just one line of code can have such a significant impact on the gulp tasks. Has anyone else experienced a similar problem?
Below is a snippet of my gulpfile.js
:
gulp.task('build', function (callback) {
runSeq('clean', 'copy', 'scripts', 'styles', callback);
});
gulp.task('clean', ['clean:app', 'clean:css', 'clean:images', 'clean:lib', 'clean:root', 'clean:rootconfig', 'clean:rootall']);
//copy files
gulp.task('copy', function(callback) {
runSeq('clean:lib', 'copy:libs', 'copy:images', 'copy:config', 'copy:html', 'copy:configjson', 'copy:schema', callback);
});
gulp.task('scripts', function(callback) {
runSeq(['clean:js'], 'ts', 'bundle:js', 'minify:js', callback);
});
gulp.task('styles', function(callback) {
runSeq('clean:css', 'copy:css', ['compile:less'], 'minify:css', 'del:css', callback);
});