Closed YanxinTang closed 2 years ago
I want to bundle js files and internal scripe tag content to onefile by gulp-useref. But according to the test result that gulp-useref can't do this.
gulp-useref
Example:
The configuration of gulp-useref using default value.
<html> <!-- build:js js/bundle.js --> <script src="a.js"></script> <script> console.log('hello') </script> <!-- endbuild --> </html>
The actual output likes this:
<html> <script src="js/bundle.js"></script> </html>
js/bundle.js content:
js/bundle.js
// a.js content
It seems that useref omit the internal script.
But I want the content of bundle.js should like this: js/bundle.js content:
bundle.js
// a.js content console.log('hello')
Can I achieve this only use gulp-useref or with other plugins?
I want to bundle js files and internal scripe tag content to onefile by
gulp-useref
. But according to the test result thatgulp-useref
can't do this.Example:
The configuration of
gulp-useref
using default value.The actual output likes this:
js/bundle.js
content:It seems that useref omit the internal script.
But I want the content of
bundle.js
should like this:js/bundle.js
content:Can I achieve this only use
gulp-useref
or with other plugins?