diff --git a/index.js b/index.js index 56f08c9..5fe35d3 100644 --- a/index.js +++ b/index.js @@ -33,7 +33,7 @@ function getScript() { const loadCssMain = resolve.sync('fg-loadcss'); const loadCssBase = path.dirname(loadCssMain); - const loadCSS = read(loadCssMain) + read(path.join(loadCssBase, 'cssrelpreload.js')); + const loadCSS = read(path.join(loadCssBase, 'cssrelpreload.js')); return UglifyJS.minify(loadCSS).code; } diff --git a/package.json b/package.json index 7f63f8a..dd3ff11 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "css": "2.2.1", "detect-indent": "5.0.0", "dom-serializer": "0.1.0", - "fg-loadcss": "1.3.1", + "fg-loadcss": "^2.0.0", "get-stdin": "5.0.1", "indent-string": "3.1.0", "lodash": "4.17.4", diff --git a/test/expected/cartoon-absolute-expected.html b/test/expected/cartoon-absolute-expected.html index 7e3300f..d584002 100644 --- a/test/expected/cartoon-absolute-expected.html +++ b/test/expected/cartoon-absolute-expected.html @@ -293,7 +293,7 @@ - + diff --git a/test/expected/cartoon-expected.html b/test/expected/cartoon-expected.html index 9ba8f2c..9f0511a 100644 --- a/test/expected/cartoon-expected.html +++ b/test/expected/cartoon-expected.html @@ -293,7 +293,7 @@ - + diff --git a/test/expected/external-expected.html b/test/expected/external-expected.html index 5303b6d..f5d5f39 100644 --- a/test/expected/external-expected.html +++ b/test/expected/external-expected.html @@ -295,7 +295,7 @@ - + diff --git a/test/expected/external-extract-expected.html b/test/expected/external-extract-expected.html index 0a121da..847caa9 100644 --- a/test/expected/external-extract-expected.html +++ b/test/expected/external-extract-expected.html @@ -295,7 +295,7 @@ - + diff --git a/test/expected/external-ignore-expected.html b/test/expected/external-ignore-expected.html index ba800b5..b6db92e 100644 --- a/test/expected/external-ignore-expected.html +++ b/test/expected/external-ignore-expected.html @@ -294,7 +294,7 @@ - + diff --git a/test/expected/index-before.html b/test/expected/index-before.html index 0b037ee..959b391 100644 --- a/test/expected/index-before.html +++ b/test/expected/index-before.html @@ -15,7 +15,7 @@ - + diff --git a/test/expected/index-inlined-absolute.html b/test/expected/index-inlined-absolute.html index 3d16e7b..4f6bf22 100644 --- a/test/expected/index-inlined-absolute.html +++ b/test/expected/index-inlined-absolute.html @@ -293,7 +293,7 @@ - + diff --git a/test/expected/index-inlined-async-final.html b/test/expected/index-inlined-async-final.html index 16efc28..4421123 100644 --- a/test/expected/index-inlined-async-final.html +++ b/test/expected/index-inlined-async-final.html @@ -293,7 +293,7 @@ - + diff --git a/test/expected/index-inlined-async-minified-final.html b/test/expected/index-inlined-async-minified-final.html index b4f1c20..8144cfb 100644 --- a/test/expected/index-inlined-async-minified-final.html +++ b/test/expected/index-inlined-async-minified-final.html @@ -15,7 +15,7 @@ - + diff --git a/test/expected/index-loadcss.html b/test/expected/index-loadcss.html index 18a1778..8b14689 100644 --- a/test/expected/index-loadcss.html +++ b/test/expected/index-loadcss.html @@ -16,7 +16,7 @@ diff --git a/test/expected/index-noscript-inlined-minified-final.html b/test/expected/index-noscript-inlined-minified-final.html index f230119..d299a91 100644 --- a/test/expected/index-noscript-inlined-minified-final.html +++ b/test/expected/index-noscript-inlined-minified-final.html @@ -18,7 +18,7 @@ - + diff --git a/yarn.lock b/yarn.lock index f77e6d1..a14a286 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1058,9 +1058,9 @@ fast-levenshtein@~2.0.4: version "2.0.5" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz#bd33145744519ab1c36c3ee9f31f08e9079b67f2" -fg-loadcss@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/fg-loadcss/-/fg-loadcss-1.3.1.tgz#8930e820959faafbb242850eeec4f2d0259430cb" +fg-loadcss@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fg-loadcss/-/fg-loadcss-2.0.0.tgz#cdf78ab1d2ca4e7d7ad927ff8d36dbbaf8cf1765" figures@^1.3.5: version "1.7.0"