mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-12-16 03:45:45 +03:00
Added web setup entry point
This commit is contained in:
parent
f21aebd1cf
commit
71259c5f19
@ -1,16 +1,16 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<meta name="theme-color" content="#000000">
|
<meta name="theme-color" content="#000000">
|
||||||
<link rel="shortcut icon" href="https://adguard.com/img/favicons/favicon.ico">
|
<link rel="shortcut icon" href="https://adguard.com/img/favicons/favicon.ico">
|
||||||
<title>AdGuard Home</title>
|
<title>AdGuard Home</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>
|
<noscript>
|
||||||
You need to enable JavaScript to run this app.
|
You need to enable JavaScript to run this app.
|
||||||
</noscript>
|
</noscript>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
16
client/public/install.html
Normal file
16
client/public/install.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
<meta name="theme-color" content="#000000">
|
||||||
|
<link rel="shortcut icon" href="https://adguard.com/img/favicons/favicon.ico">
|
||||||
|
<title>Setup AdGuard Home</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>
|
||||||
|
You need to enable JavaScript to run this app.
|
||||||
|
</noscript>
|
||||||
|
<div id="root"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
13
client/webpack.common.js
vendored
13
client/webpack.common.js
vendored
@ -8,7 +8,9 @@ const CleanWebpackPlugin = require('clean-webpack-plugin');
|
|||||||
|
|
||||||
const RESOURCES_PATH = path.resolve(__dirname);
|
const RESOURCES_PATH = path.resolve(__dirname);
|
||||||
const ENTRY_REACT = path.resolve(RESOURCES_PATH, 'src/index.js');
|
const ENTRY_REACT = path.resolve(RESOURCES_PATH, 'src/index.js');
|
||||||
|
const ENTRY_INSTALL = path.resolve(RESOURCES_PATH, 'src/install/index.js');
|
||||||
const HTML_PATH = path.resolve(RESOURCES_PATH, 'public/index.html');
|
const HTML_PATH = path.resolve(RESOURCES_PATH, 'public/index.html');
|
||||||
|
const HTML_INSTALL_PATH = path.resolve(RESOURCES_PATH, 'public/install.html');
|
||||||
|
|
||||||
const PUBLIC_PATH = path.resolve(__dirname, '../build/static');
|
const PUBLIC_PATH = path.resolve(__dirname, '../build/static');
|
||||||
|
|
||||||
@ -16,7 +18,8 @@ const config = {
|
|||||||
target: 'web',
|
target: 'web',
|
||||||
context: RESOURCES_PATH,
|
context: RESOURCES_PATH,
|
||||||
entry: {
|
entry: {
|
||||||
bundle: ENTRY_REACT,
|
main: ENTRY_REACT,
|
||||||
|
install: ENTRY_INSTALL,
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
path: PUBLIC_PATH,
|
path: PUBLIC_PATH,
|
||||||
@ -101,8 +104,16 @@ const config = {
|
|||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
inject: true,
|
inject: true,
|
||||||
cache: false,
|
cache: false,
|
||||||
|
chunks: ['main'],
|
||||||
template: HTML_PATH,
|
template: HTML_PATH,
|
||||||
}),
|
}),
|
||||||
|
new HtmlWebpackPlugin({
|
||||||
|
inject: true,
|
||||||
|
cache: false,
|
||||||
|
chunks: ['install'],
|
||||||
|
filename: 'install.html',
|
||||||
|
template: HTML_INSTALL_PATH,
|
||||||
|
}),
|
||||||
new ExtractTextPlugin({
|
new ExtractTextPlugin({
|
||||||
filename: '[name].[contenthash].css',
|
filename: '[name].[contenthash].css',
|
||||||
}),
|
}),
|
||||||
|
1
client/webpack.dev.js
vendored
1
client/webpack.dev.js
vendored
@ -2,7 +2,6 @@ const merge = require('webpack-merge');
|
|||||||
const common = require('./webpack.common.js');
|
const common = require('./webpack.common.js');
|
||||||
|
|
||||||
module.exports = merge(common, {
|
module.exports = merge(common, {
|
||||||
devtool: 'inline-source-map',
|
|
||||||
module: {
|
module: {
|
||||||
rules: [{
|
rules: [{
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
|
Loading…
Reference in New Issue
Block a user