Skip to content

Commit

Permalink
feat: Expose app config to dev template
Browse files Browse the repository at this point in the history
  • Loading branch information
vio committed Jan 12, 2021
1 parent dce7875 commit 3c60b8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/webpack/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script src="/env.js"></script>
<%= htmlWebpackPlugin.options.head %>
</head>
<body>
<div id="root"></div>
Expand Down
4 changes: 3 additions & 1 deletion src/webpack/webpack.config.dev.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const webpack = require('webpack');
const { get } = require('lodash');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');

Expand Down Expand Up @@ -41,7 +42,8 @@ const devConfig = {
plugins: [
new webpack.NamedModulesPlugin(),
new HtmlWebpackPlugin({
template: paths.public.template
template: paths.public.template,
head: get(settings, 'config.additional.global.head')
}),
new CopyWebpackPlugin({
patterns: [
Expand Down

0 comments on commit 3c60b8d

Please sign in to comment.