Skip to content

meta charset priority not respected in production build #18

Description

@dvarrazzo

I have an index.html containing:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

and the webpack config uses:

    new HtmlWebpackPartialsPlugin({
      path: './src/analytics.html',
      location: 'head',
      priority: 'high',
      options: {ga_property_id: 'UA-172517233-1'},
    }),

to inject analytics. In the dev server I see the meta tag taking precedence:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8"><script async src="...

but the production build the script is pushed before the meta tag: see https://codice.lieve.info/

<!doctype html><html><head><script async src=...</script><meta charset="utf-8">

Plugin version is 0.5.6.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions