Closed zaidhuda closed 4 years ago
linkTag should be prepended to body.
linkTag
body
linkTag appended to head
head
new MiniCssExtractPlugin({ filename: 'styles.css', chunkFilename: 'styles.css', insert(linkTag) { window.document.body.prepend(linkTag); }, }),
{ test: /\.s?[ac]ss$/, use: [ MiniCssExtractPlugin.loader, 'css-loader', 'postcss-loader', 'sass-loader', ], },
<!DOCTYPE html> <html> <head> <base href="/" /> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width" /> </head> <body> <div id="root"></div> </body> </html>
insert option only for async chunks
Expected Behavior
linkTag
should be prepended tobody
.Actual Behavior
linkTag
appended tohead
Code