-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Regardless of what is specified in Inject, for external, css files are always located in the head, and js files are always located at the end of the body.
- This does not allow executing online scripts, for example, those that depend on pluggable external libraries in the html body
html2({
template: 'src/index.html',
fileName: 'index.html',
inject: 'head',
externals: [
{type: 'css', file: 'https://unpkg.com/leaflet@1.7.1/dist/leaflet.css', pos: 'before' },
{type: 'js', file: 'https://unpkg.com/leaflet@1.7.1/dist/leaflet.js', pos: 'before' },
{type: 'js', file: 'https://code.jquery.com/jquery-3.5.1.min.js', pos: 'before' },
{type: 'css', file: 'https://code.jquery.com/ui/1.12.1/themes/hot-sneaks/jquery-ui.css', pos: 'before' },
{type: 'js', file: 'https://code.jquery.com/ui/1.12.1/jquery-ui.min.js', pos: 'before' }
],
minify: {
removeComments: true
},
})
- DOCTYPE is also added, even if it is in template
- Bundled css is not added at all, only if you specify it in the template
How to fix it?
PS I haven't found a normal alternative, so I'll have to use this one.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels