tips: My English level is so low T.T if you can't understand what i say, please don't laugh at me =。=
when html has tag:
<script src="abc/abc/abc.js?v=123456"></script>
then will throw error file is not found
And i change getSourcepath method like below:
getSourcepath (filepath, htmlpath, rootpath) {
if (filepath) {
// Relative path
if (htmlpath && filepath.indexOf('./') == 0 || filepath.indexOf('../') == 0) {
filepath = path.resolve(path.dirname(htmlpath), filepath);
} else {
// Strip leading '/'
if (filepath.indexOf('/') == 0) filepath = filepath.slice(1);
}
if (~filepath.indexOf('#')) filepath = filepath.split('#');
return Array.isArray(filepath)
? [path.resolve(rootpath, filepath[0]).replace(/\?.*$/,''), filepath[1]]
: [path.resolve(rootpath, filepath).replace(/\?.*$/,''), ''];
}
return ['', ''];
}
then all is ok
i hope you can fixed this bug
tips: My English level is so low T.T if you can't understand what i say, please don't laugh at me =。=
<script src="abc/abc/abc.js?v=123456"></script>when html has tag:
then will throw error file is not found
And i change getSourcepath method like below:
then all is ok
i hope you can fixed this bug