gulp-bundle-assets
gulp-bundle-assets copied to clipboard
Bundling fails due to json parse issue
Hi,
I sometimes get this error when i save a script- or sass-file:
Unhandled rejection SyntaxError: Unexpected end of JSON input
at JSON.parse (
I can't find any pattern of when this error accours.
gulp-task: gulp.task('watch', function () { gbundle.watch({ configPath: path.join(__dirname, '/bundle.config.js'), results: { dest: path.join(__dirname, '/bundles/'), pathPrefix: '/bundles/', fileName: 'bundle.result', unprocessedOutputPathPrefix: "/", sortUnprocessedOutput: false }, dest: path.join(__dirname, '/bundles/') }); });
Example of bundle: main: { scripts: [ config.paths.globalScripts ], styles: [ config.paths.baseLessFile, config.paths.baseSassFile, config.paths.cssFiles, "!Styles/admin/*.css" ], options: { uglify: prodLikeEnvs, minCSS: prodLikeEnvs, watch: { styles: config.paths.globalStyles, scripts: config.paths.globalScripts }, maps: false, result: { type: { scripts: scriptResult } }, transforms: { styles: styleTransforms }, rev: prodLikeEnvs } }
Any idea whats causing this?