My Vue/Webpack application includes an embedded CSS link in my index.html
file that references an external source. Here is an example snippet:
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<title><%= htmlWebpackPlugin.options.title %></title>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"
/>
...
</head>
After running npm run build
in my project directory, the generated dist/index.html
file includes this CSS link as expected.
However, when deploying my project in a Docker container, the resulting index.html
file seems to strip away this CSS link and others like it. This causes visual issues on my webpage.
What specific settings in the webpack/Docker configuration could be causing this unexpected behavior?