html-webpack-partials-plugin
html-webpack-partials-plugin copied to clipboard
meta charset priority not respected in production build
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.
@dvarrazzo is this available on a branch that i can check out locally and reproduce?
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.
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
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.