☄️ A webpack plugin for convert external stylesheet to embedded stylesheet, aka document stylesheet
npm install html-inline-css-webpack-pluginConvert external stylesheet to embedded stylesheet, aka document stylesheet.
``
=> ;`
},
}),
...
, it will leave CSS files where they are when inlining$3
`typescript
replace?: {
target: string
position?: 'before' | 'after' // default is 'before'
removeTarget?: boolean // default is false
}
`
A config for customizing the location of injection, default will add internal style sheet before the
#### target
A target for adding the internal style sheet
#### position(optional)
Add internal style sheet before/after the target
#### removeTarget(optional)
if true, it will remove the target from the output HTML
> Please note that HTML comment is removed by default by the html-webpack-plugin in production mode. #16
##### example
`html
``typescript
...
new HTMLInlineCSSWebpackPlugin({
replace: {
removeTarget: true,
target: '',
},
}),
...
`
###### output:
`html
``