Skip to content

Commit 15a5291

Browse files
committed
commented the CSS injection to bottom
1 parent bce8f05 commit 15a5291

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

vite.config.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,24 @@ const jsToBottomNoModule = () => {
4444
html = html.replace(scriptTag, '')
4545
customInjection += scriptTag
4646

47-
const linkTagModulePreloadList=[...html.matchAll(/<link rel="modulepreload"[^>]*>/g)]
47+
const linkTagModulePreloadList = [...html.matchAll(/<link rel="modulepreload"[^>]*>/g)]
4848
console.log('------------------------------------------------------------')
4949
linkTagModulePreloadList.forEach((linkData) => {
5050
console.log('\n modulepreload', linkData[0], '\n')
5151
html = html.replace(linkData[0], '')
5252
customInjection += linkData[0]
5353
})
5454

55-
let linkTagStyleSheetList = [...html.matchAll(/<link rel="stylesheet"[^>]*>/g)]
56-
console.log('------------------------------------------------------------')
57-
linkTagStyleSheetList.forEach((linkData) => {
58-
console.log('\n stylesheet', linkData[0], '\n')
59-
html = html.replace(linkData[0], '')
60-
customInjection += linkData[0]
61-
})
55+
/*
56+
* uncomment bellow after CSS fix on pull image digest cluster env and others wherever order is giving issues
57+
*/
58+
// let linkTagStyleSheetList = [...html.matchAll(/<link rel="stylesheet"[^>]*>/g)]
59+
// console.log('------------------------------------------------------------')
60+
// linkTagStyleSheetList.forEach((linkData) => {
61+
// console.log('\n stylesheet', linkData[0], '\n')
62+
// html = html.replace(linkData[0], '')
63+
// customInjection += linkData[0]
64+
// })
6265

6366
html = html.replace('<!-- # INSERT SCRIPT HERE -->', customInjection)
6467
console.log('------------------------------------------------------------')

0 commit comments

Comments
 (0)