Twitter bootstrap 我的Gulp内联源代码映射文件大小是否应该和它一样大?

Twitter bootstrap 我的Gulp内联源代码映射文件大小是否应该和它一样大?,twitter-bootstrap,sass,gulp,gulp-sourcemaps,Twitter Bootstrap,Sass,Gulp,Gulp Sourcemaps,我在我的Sass风格中加入了Bootstrap。在未启用sourcemaps的情况下编译Sass时,文件大小约为150kb。当我打开sourcemaps时,文件大小将达到800kb。这是意料之中的事吗?最终,我会认真挑选我需要的Bootstrap的部分,但现在似乎很多 以下是我的Sass任务: gulp.task('sass', function() { return sass(config.sassPath, { style: 'compressed',

我在我的Sass风格中加入了Bootstrap。在未启用sourcemaps的情况下编译Sass时,文件大小约为150kb。当我打开sourcemaps时,文件大小将达到800kb。这是意料之中的事吗?最终,我会认真挑选我需要的Bootstrap的部分,但现在似乎很多

以下是我的Sass任务:

gulp.task('sass', function() {
    return sass(config.sassPath, {
        style: 'compressed',
        loadPath: ['./node_modules/bootstrap-sass/assets/stylesheets'],
        sourcemap: true
    })
    .on('error', function (err) {
        console.log('Error!', err.message);
    })
    .pipe( autoprefix('last 2 versions') )
    // .pipe( sourcemaps.init() )
    .pipe( sourcemaps.write() )
    .pipe( gulp.dest('./public/css') )
    .pipe( reload( {stream: true} ) )
    .pipe( notify('Sass compiled') );
});

您可以在外部文件上编写源代码映射,例如
.pipe(sourcemaps.write('./sourcemaps\u DIRNAME'))
或者缩小生产CSS,而不使用源代码映射