-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trying to fix githug pages deployment
- Loading branch information
Showing
15 changed files
with
150 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
const HtmlInlineCssWebpackPlugin = require('html-inline-css-webpack-plugin').default; | ||
const HtmlInlineScriptPlugin = require('html-inline-script-webpack-plugin'); | ||
|
||
module.exports = { | ||
webpack: function (config, env) { | ||
//inline css and scripts right after chunk plugin. | ||
//chunk plugin will not be present for development build and thats ok. | ||
const inlineChunkHtmlPlugin = config.plugins.find(element => element.constructor.name === "InlineChunkHtmlPlugin"); | ||
if (inlineChunkHtmlPlugin) { | ||
config.plugins.splice(config.plugins.indexOf(inlineChunkHtmlPlugin), 0, | ||
new HtmlInlineCssWebpackPlugin(), | ||
new HtmlInlineScriptPlugin() | ||
); | ||
} | ||
|
||
//Override HtmlWebpack plugin with preserving all options and modifying what we want | ||
const htmlWebpackPlugin = config.plugins.find(element => element.constructor.name === "HtmlWebpackPlugin"); | ||
config.plugins.splice(config.plugins.indexOf(htmlWebpackPlugin), 1, | ||
new HtmlWebpackPlugin( | ||
{ | ||
...htmlWebpackPlugin.userOptions, | ||
inject: 'body' | ||
} | ||
) | ||
); | ||
|
||
return config; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
docs/static/css/main.e6c13ad2.css.map → docs/static/css/main.b02f0842.css.map
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
docs/static/js/main.bc164b3f.js.map → docs/static/js/main.af253af0.js.map
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters