<bdo id='Tdt0m'></bdo><ul id='Tdt0m'></ul>
    1. <legend id='Tdt0m'><style id='Tdt0m'><dir id='Tdt0m'><q id='Tdt0m'></q></dir></style></legend>
    2. <tfoot id='Tdt0m'></tfoot>
      <i id='Tdt0m'><tr id='Tdt0m'><dt id='Tdt0m'><q id='Tdt0m'><span id='Tdt0m'><b id='Tdt0m'><form id='Tdt0m'><ins id='Tdt0m'></ins><ul id='Tdt0m'></ul><sub id='Tdt0m'></sub></form><legend id='Tdt0m'></legend><bdo id='Tdt0m'><pre id='Tdt0m'><center id='Tdt0m'></center></pre></bdo></b><th id='Tdt0m'></th></span></q></dt></tr></i><div id='Tdt0m'><tfoot id='Tdt0m'></tfoot><dl id='Tdt0m'><fieldset id='Tdt0m'></fieldset></dl></div>

    3. <small id='Tdt0m'></small><noframes id='Tdt0m'>

      1. Gulp-sourcemaps 没有创建源映射文件?

        时间:2023-05-29

            <i id='7Lh7e'><tr id='7Lh7e'><dt id='7Lh7e'><q id='7Lh7e'><span id='7Lh7e'><b id='7Lh7e'><form id='7Lh7e'><ins id='7Lh7e'></ins><ul id='7Lh7e'></ul><sub id='7Lh7e'></sub></form><legend id='7Lh7e'></legend><bdo id='7Lh7e'><pre id='7Lh7e'><center id='7Lh7e'></center></pre></bdo></b><th id='7Lh7e'></th></span></q></dt></tr></i><div id='7Lh7e'><tfoot id='7Lh7e'></tfoot><dl id='7Lh7e'><fieldset id='7Lh7e'></fieldset></dl></div>
              <tbody id='7Lh7e'></tbody>

            • <legend id='7Lh7e'><style id='7Lh7e'><dir id='7Lh7e'><q id='7Lh7e'></q></dir></style></legend>

              <small id='7Lh7e'></small><noframes id='7Lh7e'>

              1. <tfoot id='7Lh7e'></tfoot>
                  <bdo id='7Lh7e'></bdo><ul id='7Lh7e'></ul>
                  本文介绍了Gulp-sourcemaps 没有创建源映射文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我正在尝试让 Gulp 源映射来写入文件,但我无法在任何地方看到这些文件.如果在工作树中创建了任何新文件,我会在 git status 中看到它们,但没有找到任何新文件.

                  I'm trying to get Gulp sourcemaps to write files, but I can't see these files anywhere. If any new files were created in the working tree, I would see them in git status, but nothing no new files to be found.

                  下面是我的 gulpfile.js

                  Below is my gulpfile.js

                  var gulp = require('gulp'),
                      sourcemaps = require('gulp-sourcemaps'),
                      minify = require('gulp-minify'),
                      concat = require('gulp-concat'),
                      uglify = require('gulp-uglify');
                  
                  gulp.task('js', function() {
                  
                      return gulp.src('src/js/**/*.js')
                          .pipe(sourcemaps.init())
                              .pipe(concat('all.js'))
                              .pipe(uglify())
                          .pipe(sourcemaps.write())
                          .pipe(gulp.dest('./public/js'));
                  });
                  

                  这是正确的用法吗?从我在其他地方看到的例子来看,这应该没问题.我还看到这些插件与源地图兼容:https://github.com/floridoo/gulp-sourcemaps/wiki/Plugins-with-gulp-sourcemaps-support

                  Is this correct usage? From the examples I've seen elsewhere, this should be OK. I also see that these plugins are compatable with sourcemaps: https://github.com/floridoo/gulp-sourcemaps/wiki/Plugins-with-gulp-sourcemaps-support

                  推荐答案

                  使用 sourcemaps.write() 方法,将源映射行附加到 all.js文件.如果要编写外部源映射文件,则需要将路径传递给 sourcemaps.write() 方法:

                  Using the sourcemaps.write() method the way you do appends a source maps line to the all.js file. If you want to write external source map files, you'll need to pass the path to the sourcemaps.write() method:

                  sourcemaps.write('../maps')
                  

                  https://www.npmjs.com/package/gulp-sourcemaps

                  这篇关于Gulp-sourcemaps 没有创建源映射文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                • <i id='ppsD9'><tr id='ppsD9'><dt id='ppsD9'><q id='ppsD9'><span id='ppsD9'><b id='ppsD9'><form id='ppsD9'><ins id='ppsD9'></ins><ul id='ppsD9'></ul><sub id='ppsD9'></sub></form><legend id='ppsD9'></legend><bdo id='ppsD9'><pre id='ppsD9'><center id='ppsD9'></center></pre></bdo></b><th id='ppsD9'></th></span></q></dt></tr></i><div id='ppsD9'><tfoot id='ppsD9'></tfoot><dl id='ppsD9'><fieldset id='ppsD9'></fieldset></dl></div>

                      • <bdo id='ppsD9'></bdo><ul id='ppsD9'></ul>
                        <tfoot id='ppsD9'></tfoot>

                          <small id='ppsD9'></small><noframes id='ppsD9'>

                        • <legend id='ppsD9'><style id='ppsD9'><dir id='ppsD9'><q id='ppsD9'></q></dir></style></legend>
                            <tbody id='ppsD9'></tbody>