Skip to content

Instantly share code, notes, and snippets.

@arikanmstf
Last active July 31, 2017 21:18
Show Gist options
  • Save arikanmstf/5c34206278341294da5d8b9e3405dbdc to your computer and use it in GitHub Desktop.
Save arikanmstf/5c34206278341294da5d8b9e3405dbdc to your computer and use it in GitHub Desktop.
Dynamic Html Bootstrap - Webpack
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="<%= htmlWebpackPlugin.options.extraFiles.css %>">
<title>My Library</title>
</head>
<body>
<div class="main-content"></div>
</body>
</html>
/* ... */
const HtmlWebpack =
new HtmlWebpackPlugin({
template: 'src/index.ejs',
inject: 'body',
hash: true,
filename: `index.html`,
description: DESCRIPTION,
extraFiles: {
css: config.homeUrl + 'static/css/bootstrap.min.css'
}
});
/* ... */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment