Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta charset priority not respected in production build #18

Open
dvarrazzo opened this issue Jul 15, 2020 · 4 comments
Open

meta charset priority not respected in production build #18

dvarrazzo opened this issue Jul 15, 2020 · 4 comments
Labels
Hacktoberfest help wanted Extra attention is needed

Comments

@dvarrazzo
Copy link

dvarrazzo commented Jul 15, 2020

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.

@colbyfayock
Copy link
Owner

@dvarrazzo is this available on a branch that i can check out locally and reproduce?

@dvarrazzo
Copy link
Author

Sure, the repos in the first link should be public: https://github.com/codice-lieve/codice.lieve.info

npm start serves a correctly injected page, npm run build builds a defective page in the dist dir.

@colbyfayock
Copy link
Owner

Ah okay, maybe I'm crazy but I wasn't seeing this plugin in there yesterday 🤦‍♂️ i'll check this out sometime this weekend for ya

@dvarrazzo
Copy link
Author

Ah okay, maybe I'm crazy but I wasn't seeing this plugin in there yesterday

No you are right: apologies but I used the wrong permalinks and pointed to a commit that didn't have the plugin yet. Permalink fixed in case master evolves to something else.

@colbyfayock colbyfayock added Hacktoberfest help wanted Extra attention is needed labels Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants