Skip to content

Instantly share code, notes, and snippets.

@saionaro
Last active June 4, 2020 11:23
Show Gist options
  • Save saionaro/86d5937db511b116051575b9d0ed7418 to your computer and use it in GitHub Desktop.
Save saionaro/86d5937db511b116051575b9d0ed7418 to your computer and use it in GitHub Desktop.
// If you want to use an embedded runtime chunk for one bundle and one common for the rest
const STANDALONE_ENTRYPOINT_NAME = "entry_name";
module.exports = {
...
optimization: {
...
runtimeChunk: {
name: ({ name }) => (name === STANDALONE_ENTRYPOINT_NAME ? STANDALONE_ENTRYPOINT_NAME : 'runtime')
},
...
},
...
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment