aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-08-24 22:37:06 +0800
committercrupest <crupest@outlook.com>2020-08-24 22:37:06 +0800
commit13cf2ab0598adb291066ef64a7b377909ef58525 (patch)
tree81e0994b0c6b81675ef740ea7d8248819d95c4ca
parentf7b5ebbf08704c4e188df8c3a4e4a6985ed52ec9 (diff)
downloadtimeline-13cf2ab0598adb291066ef64a7b377909ef58525.tar.gz
timeline-13cf2ab0598adb291066ef64a7b377909ef58525.tar.bz2
timeline-13cf2ab0598adb291066ef64a7b377909ef58525.zip
Remove usage of html-webpack-template.
-rw-r--r--Timeline/ClientApp/.pnp.js19
-rw-r--r--Timeline/ClientApp/package.json1
-rw-r--r--Timeline/ClientApp/src/app/index.ejs29
-rw-r--r--Timeline/ClientApp/webpack.common.js17
-rw-r--r--Timeline/ClientApp/yarn.lock10
5 files changed, 30 insertions, 46 deletions
diff --git a/Timeline/ClientApp/.pnp.js b/Timeline/ClientApp/.pnp.js
index 3083bde8..06cec550 100644
--- a/Timeline/ClientApp/.pnp.js
+++ b/Timeline/ClientApp/.pnp.js
@@ -206,10 +206,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"virtual:71f98ed0939a4e8e7ea376e302a494701bc5b6aa7a7eb81870139ee3950a7c417a3d13b346b5b526d93952a598dffe628a0fac2148047debade23536cb3d7957#npm:3.2.0::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtml-webpack-plugin%2Fdownload%2Fhtml-webpack-plugin-3.2.0.tgz"
],
[
- "html-webpack-template",
- "virtual:71f98ed0939a4e8e7ea376e302a494701bc5b6aa7a7eb81870139ee3950a7c417a3d13b346b5b526d93952a598dffe628a0fac2148047debade23536cb3d7957#npm:6.2.0::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtml-webpack-template%2Fdownload%2Fhtml-webpack-template-6.2.0.tgz"
- ],
- [
"http-server",
"npm:0.12.3::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-server%2Fdownload%2Fhttp-server-0.12.3.tgz"
],
@@ -413,7 +409,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["eslint-plugin-react-hooks", "virtual:71f98ed0939a4e8e7ea376e302a494701bc5b6aa7a7eb81870139ee3950a7c417a3d13b346b5b526d93952a598dffe628a0fac2148047debade23536cb3d7957#npm:4.0.8::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-plugin-react-hooks%2Fdownload%2Feslint-plugin-react-hooks-4.0.8.tgz"],
["file-loader", "virtual:71f98ed0939a4e8e7ea376e302a494701bc5b6aa7a7eb81870139ee3950a7c417a3d13b346b5b526d93952a598dffe628a0fac2148047debade23536cb3d7957#npm:6.0.0::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Ffile-loader%2Fdownload%2Ffile-loader-6.0.0.tgz"],
["html-webpack-plugin", "virtual:71f98ed0939a4e8e7ea376e302a494701bc5b6aa7a7eb81870139ee3950a7c417a3d13b346b5b526d93952a598dffe628a0fac2148047debade23536cb3d7957#npm:3.2.0::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtml-webpack-plugin%2Fdownload%2Fhtml-webpack-plugin-3.2.0.tgz"],
- ["html-webpack-template", "virtual:71f98ed0939a4e8e7ea376e302a494701bc5b6aa7a7eb81870139ee3950a7c417a3d13b346b5b526d93952a598dffe628a0fac2148047debade23536cb3d7957#npm:6.2.0::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtml-webpack-template%2Fdownload%2Fhtml-webpack-template-6.2.0.tgz"],
["http-server", "npm:0.12.3::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-server%2Fdownload%2Fhttp-server-0.12.3.tgz"],
["i18next", "npm:19.6.2::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Fi18next%2Fdownload%2Fi18next-19.6.2.tgz"],
["i18next-browser-languagedetector", "npm:5.0.0::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Fi18next-browser-languagedetector%2Fdownload%2Fi18next-browser-languagedetector-5.0.0.tgz"],
@@ -7219,19 +7214,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"linkType": "HARD",
}]
]],
- ["html-webpack-template", [
- ["virtual:71f98ed0939a4e8e7ea376e302a494701bc5b6aa7a7eb81870139ee3950a7c417a3d13b346b5b526d93952a598dffe628a0fac2148047debade23536cb3d7957#npm:6.2.0::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtml-webpack-template%2Fdownload%2Fhtml-webpack-template-6.2.0.tgz", {
- "packageLocation": "./.yarn/$$virtual/html-webpack-template-virtual-34f1f008e3/0/cache/html-webpack-template-npm-6.2.0-eb72de38c4-099bbb5a5d.zip/node_modules/html-webpack-template/",
- "packageDependencies": [
- ["html-webpack-template", "virtual:71f98ed0939a4e8e7ea376e302a494701bc5b6aa7a7eb81870139ee3950a7c417a3d13b346b5b526d93952a598dffe628a0fac2148047debade23536cb3d7957#npm:6.2.0::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtml-webpack-template%2Fdownload%2Fhtml-webpack-template-6.2.0.tgz"],
- ["html-webpack-plugin", "virtual:71f98ed0939a4e8e7ea376e302a494701bc5b6aa7a7eb81870139ee3950a7c417a3d13b346b5b526d93952a598dffe628a0fac2148047debade23536cb3d7957#npm:3.2.0::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtml-webpack-plugin%2Fdownload%2Fhtml-webpack-plugin-3.2.0.tgz"]
- ],
- "packagePeers": [
- "html-webpack-plugin"
- ],
- "linkType": "HARD",
- }]
- ]],
["htmlparser2", [
["npm:3.10.1::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtmlparser2%2Fdownload%2Fhtmlparser2-3.10.1.tgz", {
"packageLocation": "./.yarn/cache/htmlparser2-npm-3.10.1-8b44da0721-94fa6312e6.zip/node_modules/htmlparser2/",
@@ -12685,7 +12667,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["eslint-plugin-react-hooks", "virtual:71f98ed0939a4e8e7ea376e302a494701bc5b6aa7a7eb81870139ee3950a7c417a3d13b346b5b526d93952a598dffe628a0fac2148047debade23536cb3d7957#npm:4.0.8::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-plugin-react-hooks%2Fdownload%2Feslint-plugin-react-hooks-4.0.8.tgz"],
["file-loader", "virtual:71f98ed0939a4e8e7ea376e302a494701bc5b6aa7a7eb81870139ee3950a7c417a3d13b346b5b526d93952a598dffe628a0fac2148047debade23536cb3d7957#npm:6.0.0::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Ffile-loader%2Fdownload%2Ffile-loader-6.0.0.tgz"],
["html-webpack-plugin", "virtual:71f98ed0939a4e8e7ea376e302a494701bc5b6aa7a7eb81870139ee3950a7c417a3d13b346b5b526d93952a598dffe628a0fac2148047debade23536cb3d7957#npm:3.2.0::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtml-webpack-plugin%2Fdownload%2Fhtml-webpack-plugin-3.2.0.tgz"],
- ["html-webpack-template", "virtual:71f98ed0939a4e8e7ea376e302a494701bc5b6aa7a7eb81870139ee3950a7c417a3d13b346b5b526d93952a598dffe628a0fac2148047debade23536cb3d7957#npm:6.2.0::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtml-webpack-template%2Fdownload%2Fhtml-webpack-template-6.2.0.tgz"],
["http-server", "npm:0.12.3::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-server%2Fdownload%2Fhttp-server-0.12.3.tgz"],
["i18next", "npm:19.6.2::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Fi18next%2Fdownload%2Fi18next-19.6.2.tgz"],
["i18next-browser-languagedetector", "npm:5.0.0::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Fi18next-browser-languagedetector%2Fdownload%2Fi18next-browser-languagedetector-5.0.0.tgz"],
diff --git a/Timeline/ClientApp/package.json b/Timeline/ClientApp/package.json
index 27974f72..921488cd 100644
--- a/Timeline/ClientApp/package.json
+++ b/Timeline/ClientApp/package.json
@@ -91,7 +91,6 @@
"eslint-plugin-react-hooks": "^4.0.8",
"file-loader": "^6.0.0",
"html-webpack-plugin": "^3.2.0",
- "html-webpack-template": "^6.2.0",
"http-server": "^0.12.3",
"mini-css-extract-plugin": "^0.10.0",
"pnp-webpack-plugin": "^1.6.4",
diff --git a/Timeline/ClientApp/src/app/index.ejs b/Timeline/ClientApp/src/app/index.ejs
new file mode 100644
index 00000000..49306786
--- /dev/null
+++ b/Timeline/ClientApp/src/app/index.ejs
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+ <meta name="viewport" content="width=device-width,initial-scale=1.0" />
+
+ <link rel="icon" href="/favicon.ico" />
+ <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
+ <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
+ <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
+ <link rel="manifest" href="/site.webmanifest" />
+ <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
+ <meta name="msapplication-TileColor" content="#2d89ef" />
+ <meta name="theme-color" content="#ffffff" />
+
+ <title><%= htmlWebpackPlugin.options.title %></title>
+ </head>
+ <body>
+ <noscript>
+ <strong>
+ We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
+ properly without JavaScript enabled. Please enable it to continue.
+ </strong>
+ </noscript>
+ <div id="app"></div>
+ <!-- built files will be auto injected -->
+ </body>
+</html>
diff --git a/Timeline/ClientApp/webpack.common.js b/Timeline/ClientApp/webpack.common.js
index 7d40fdce..b8e2a5f6 100644
--- a/Timeline/ClientApp/webpack.common.js
+++ b/Timeline/ClientApp/webpack.common.js
@@ -1,5 +1,4 @@
const path = require('path');
-const htmlWebpackTemplate = require('html-webpack-template');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const PnpWebpackPlugin = require('pnp-webpack-plugin');
const postcssPresetEnv = require('postcss-preset-env');
@@ -88,21 +87,7 @@ config.output
config.plugin('html').use(HtmlWebpackPlugin, [
{
- inject: false,
- template: htmlWebpackTemplate,
-
- appMountId: 'app',
- mobile: true,
-
- headHtmlSnippet: `
- <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
- <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
- <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
- <link rel="manifest" href="/site.webmanifest">
- <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
- <meta name="msapplication-TileColor" content="#2d89ef">
- <meta name="theme-color" content="#ffffff">
- `,
+ template: 'src/app/index.ejs',
title: 'Timeline',
},
]);
diff --git a/Timeline/ClientApp/yarn.lock b/Timeline/ClientApp/yarn.lock
index bcb7947a..cabbef2c 100644
--- a/Timeline/ClientApp/yarn.lock
+++ b/Timeline/ClientApp/yarn.lock
@@ -5938,15 +5938,6 @@ fsevents@~2.1.2:
languageName: node
linkType: hard
-"html-webpack-template@npm:^6.2.0":
- version: 6.2.0
- resolution: "html-webpack-template@npm:6.2.0::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtml-webpack-template%2Fdownload%2Fhtml-webpack-template-6.2.0.tgz"
- peerDependencies:
- html-webpack-plugin: 2.x || ^3
- checksum: 099bbb5a5dc30f285054be63244324f8fa4248e5385eff9a8acaafa140a9160bfa69ede6add094201dc242bf126498c709a86c07993e576dda7cd09c762a24cb
- languageName: node
- linkType: hard
-
"htmlparser2@npm:^3.3.0":
version: 3.10.1
resolution: "htmlparser2@npm:3.10.1::__archiveUrl=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtmlparser2%2Fdownload%2Fhtmlparser2-3.10.1.tgz"
@@ -10860,7 +10851,6 @@ fsevents@~2.1.2:
eslint-plugin-react-hooks: ^4.0.8
file-loader: ^6.0.0
html-webpack-plugin: ^3.2.0
- html-webpack-template: ^6.2.0
http-server: ^0.12.3
i18next: ^19.6.2
i18next-browser-languagedetector: ^5.0.0