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

Required css not added to head since upgrade to latest #350

Open
benoj opened this issue Jan 21, 2018 · 0 comments
Open

Required css not added to head since upgrade to latest #350

benoj opened this issue Jan 21, 2018 · 0 comments

Comments

@benoj
Copy link

benoj commented Jan 21, 2018

Hi,

I recently upgraded hjs-webpack to the latest version. However since the upgrade my CSS files which are imported into the js are not being added to the head.

Here is my config:

const config = getConfig({
  in: 'src/index.js',
  out: 'build',
  output: {
    filename: "js/bundle.[name].[hash].js",
    cssFilename: "css/styles.[hash].css",
    hash: true
  },
  port: 8080,
  clearBeforeBuild: true,
  html: function (context) {
    return {
      'index.html': context.defaultTemplate({
        head: `
      <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.12/semantic.min.css"></link>
      <script src="https://cdn.ravenjs.com/3.22.1/raven.min.js" crossorigin="anonymous"></script>
      `
      })
    }
  }
})

output:

<!doctype html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.12/semantic.min.css"></link>
<script src="https://cdn.ravenjs.com/3.22.1/raven.min.js" crossorigin="anonymous"></script
</head>
<body>
<div id="root">
</div>
<script src="/js/bundle.main.0ed91bc410623fb474dc.js"></script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant