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

feat: support insert chunk scripts in head #1258

Merged
merged 2 commits into from
Oct 16, 2018
Merged

Conversation

sorrycc
Copy link
Member

@sorrycc sorrycc commented Oct 16, 2018

Support object type chunk, if you want to insert chunk script to <head>.

chunks: [
  'a',
  { name: 'b', headScript: true },
  'umi',
]

Then the output will be,

<head>
<link rel="stylesheet" href="/a.css" />
<link rel="stylesheet" href="/b.css" />
<link rel="stylesheet" href="/umi.css" />
<script>
  window.routerBase = "/";
</script>
<script src="/b.js"></script>
</head>
<body>
<div id="root"></div>
<script src="/a.js"></script>
<script src="/umi.js"></script>
</body>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant