mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 09:37:02 +00:00
Set base path in index.html (#172)
- Create a new index-dev.html for webpack live server - Update Go+index.html to set <base href> - Fixes #171
This commit is contained in:
21
ui/public/index-dev.html
Normal file
21
ui/public/index-dev.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- This index file will be served by the webpack development server. -->
|
||||
<base href="/">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="theme-color" content="#000000">
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<title>Inbucket</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
You need to enable JavaScript to run this app.
|
||||
</noscript>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="{{ .BasePath }}">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
@@ -54,11 +54,18 @@ module.exports = (env, argv) => {
|
||||
template: 'public/index.html',
|
||||
favicon: 'public/favicon.png',
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
filename: 'index-dev.html',
|
||||
template: 'public/index-dev.html',
|
||||
favicon: 'public/favicon.png',
|
||||
}),
|
||||
],
|
||||
devServer: {
|
||||
historyApiFallback: {
|
||||
index: '/index-dev.html',
|
||||
},
|
||||
index: 'index-dev.html',
|
||||
inline: true,
|
||||
historyApiFallback: true,
|
||||
stats: { colors: true },
|
||||
overlay: true,
|
||||
open: true,
|
||||
proxy: [{
|
||||
@@ -66,6 +73,7 @@ module.exports = (env, argv) => {
|
||||
target: 'http://localhost:9000',
|
||||
ws: true,
|
||||
}],
|
||||
stats: { colors: true },
|
||||
watchOptions: {
|
||||
ignored: /node_modules/,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user