Hello
I have been using a yeoman/generator-chrome-extension.
When I run the build, clean-css related errors will occur.
sourcemap of bootstrap.css seems to cause.
how do I resolve this problem?
regards.
html
<html>
<head>
<meta charset="utf-8">
<!-- build:css styles/popup-vendor.css -->
<!-- bower:css -->
<link href="bower_components/bootstrap/dist/css/bootstrap.css" rel="stylesheet">
<!-- endbower -->
<!-- endbuild -->
<!-- build:css styles/main.css -->
<link href="styles/main.css" rel="stylesheet">
<!-- endbuild -->
</head>
<body>
.....
gulpfile.babel.js: line 52-61
gulp.task('html', () => {
return gulp.src('app/*.html')
.pipe($.useref({searchPath: ['.tmp', 'app', '.']}))
.pipe($.sourcemaps.init())
.pipe($.if('*.js', $.uglify()))
.pipe($.if('*.css', $.cleanCss({compatibility: '*'}))) // <- this line
.pipe($.sourcemaps.write())
.pipe($.if('*.html', $.htmlmin({removeComments: true, collapseWhitespace: true})))
.pipe(gulp.dest('dist'));
});
command
$ gulp build
[13:47:48] Requiring external module babel-register
(node:6899) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
[13:47:49] Using gulpfile ~/works/jsworks/extension-example/gulpfile.babel.js
[13:47:49] Starting 'build'...
[13:47:49] Starting 'lint'...
[13:47:49] Finished 'lint' after 254 ms
[13:47:49] Starting 'chromeManifest'...
[13:47:49] Finished 'chromeManifest' after 190 ms
[13:47:49] Starting 'html'...
[13:47:49] Starting 'images'...
[13:47:49] Starting 'extras'...
fs.js:634
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT: no such file or directory, open '/Users/vertuxx/works/jsworks/extension-example/app/styles/bootstrap.css.map'
at Error (native)
at Object.fs.openSync (fs.js:634:18)
at Object.fs.readFileSync (fs.js:502:33)
at fromSource (/Users/vertuxx/works/jsworks/extension-example/node_modules/clean-css/lib/utils/input-source-map-tracker.js:84:30)
at InputSourceMapStore.track (/Users/vertuxx/works/jsworks/extension-example/node_modules/clean-css/lib/utils/input-source-map-tracker.js:237:5)
at Object.whenDone (/Users/vertuxx/works/jsworks/extension-example/node_modules/clean-css/lib/clean.js:145:44)
at processNext (/Users/vertuxx/works/jsworks/extension-example/node_modules/clean-css/lib/imports/inliner.js:105:13)
at importFrom (/Users/vertuxx/works/jsworks/extension-example/node_modules/clean-css/lib/imports/inliner.js:79:
$
Hello
I have been using a yeoman/generator-chrome-extension.
When I run the build, clean-css related errors will occur.
sourcemap of bootstrap.css seems to cause.
how do I resolve this problem?
regards.
html
gulpfile.babel.js: line 52-61
command