mirror of
https://github.com/a2nt/webpack-bootstrap-ui-kit.git
synced 2024-10-22 11:05:45 +02:00
FIX: minor fixtures
This commit is contained in:
parent
093f52fdfd
commit
d61270598c
2
dist/css/app.css
vendored
2
dist/css/app.css
vendored
File diff suppressed because one or more lines are too long
2
dist/index.html
vendored
2
dist/index.html
vendored
@ -1,4 +1,4 @@
|
|||||||
<!doctype html><html lang="en"><head><title>Webpack Bootstrap 4 UI Demo</title><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="description" content="UI Kit"/><meta name="author" content="Tony Air <tony@twma.pro>"/><meta name="ping" content="/Security/ping"/><meta name="api_url" content="http://127.0.0.1/graphql"/><meta name="api_static_domain" content="http://127.0.0.1"/><meta name="swversion" content="sw-1613895047969"/><base href="http://127.0.0.1:3001"/><script defer="defer" src="js/app.js"></script><script defer="defer" src="js/app_sw.js"></script><link href="css/app.css" rel="stylesheet"></head><body data-default-lng="0" data-default-lat="0"><div class="wrapper"><style>@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0,0)}100%{transform:translate(19px,0)}}body,html{font-size:14px;margin:0;padding:0;background:#fff;color:#333;overflow-x:hidden}#PageLoading{position:fixed;left:0;top:0;margin:0;width:100%!important;height:100%!important;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:2000;will-change:opacity;background:#212529;color:#212529}#PageLoading .logo{filter:invert(1);margin-left:20px}.main-bn{position:fixed;top:0;left:0;width:100%;z-index:99999999;padding:.5rem 1rem;text-align:center;color:#fff;background:red}iframe,img{max-width:100%}.loading-spinner{text-align:center}.lds-ellipsis{display:inline-block;position:relative;width:64px;height:64px;color:#fff}.lds-ellipsis div{position:absolute;top:27px;width:11px;height:11px;border-radius:50%;background:#888;animation-timing-function:cubic-bezier(0,1,1,0)}.lds-ellipsis div:nth-child(1){left:6px;animation:lds-ellipsis1 .6s infinite}.lds-ellipsis div:nth-child(2){left:6px;animation:lds-ellipsis2 .6s infinite}.lds-ellipsis div:nth-child(3){left:26px;animation:lds-ellipsis2 .6s infinite}.lds-ellipsis div:nth-child(4){left:45px;animation:lds-ellipsis3 .6s infinite}@keyframes lds-text{from{font-size:1em}to{font-size:1.5em}}.lds-text{position:absolute;top:50%;left:50%;margin-left:-5rem;margin-top:8rem;font-size:.8rem;letter-spacing:.25em;color:#fff}.lds-text b{font-weight:300;animation:lds-text 5s ease infinite alternate}.lds-text b:nth-child(1){animation-delay:.5s}.lds-text b:nth-child(2){animation-delay:1s}.lds-text b:nth-child(3){animation-delay:1.5s}.lds-text b:nth-child(4){animation-delay:2s}.lds-text b:nth-child(5){animation-delay:2.5s}.lds-text b:nth-child(6){animation-delay:3s}.lds-text b:nth-child(7){animation-delay:3.5s}.lds-text b:nth-child(8){animation-delay:4s}.lds-text b:nth-child(9){animation-delay:4.5s}.lds-text b:nth-child(10){animation-delay:5s}</style><div id="PageLoading"><div class="loading-spinner"><img class="logo" src="../fonts/logo.svg" width="200" alt="UI Kit"/><br/><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div><br/><div class="lds-placeholder">LOADING...</div><div class="lds-text"><b>L</b> <b>O</b> <b>A</b> <b>D</b> <b>I</b> <b>N</b> <b>G</b> <b>.</b> <b>.</b> <b>.</b></div></div></div><div id="SiteWideAlerts" class="offline-message"><div class="alert alert-danger alert-offline alert-dismissible fade show" role="alert"><div class="typography">The Internet connection is missing right now, but you're able to browse previously opened pages offline.</div><button type="button" class="btn btn-danger btn-close" data-bs-dismiss="alert" aria-label="Close"><i class="fas fa-times"></i></button></div><noscript><div class="main-bn alert alert-fixed-top alert-danger" role="alert">Please, enable javascript.</div></noscript><!--[if lt IE 11
|
<!doctype html><html lang="en"><head><title>Webpack Bootstrap 4 UI Demo</title><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="description" content="UI Kit"/><meta name="author" content="Tony Air <tony@twma.pro>"/><meta name="ping" content="/Security/ping"/><meta name="api_url" content="http://127.0.0.1/graphql"/><meta name="api_static_domain" content="http://127.0.0.1"/><meta name="swversion" content="sw-1613904049437"/><base href="http://127.0.0.1:3001"/><script defer="defer" src="js/app.js"></script><script defer="defer" src="js/app_sw.js"></script><link href="css/app.css" rel="stylesheet"></head><body data-default-lng="0" data-default-lat="0"><div class="wrapper"><style>@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0,0)}100%{transform:translate(19px,0)}}body,html{font-size:14px;margin:0;padding:0;background:#fff;color:#333;overflow-x:hidden}#PageLoading{position:fixed;left:0;top:0;margin:0;width:100%!important;height:100%!important;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:2000;will-change:opacity;background:#212529;color:#212529}#PageLoading .logo{filter:invert(1);margin-left:20px}.main-bn{position:fixed;top:0;left:0;width:100%;z-index:99999999;padding:.5rem 1rem;text-align:center;color:#fff;background:red}iframe,img{max-width:100%}.loading-spinner{text-align:center}.lds-ellipsis{display:inline-block;position:relative;width:64px;height:64px;color:#fff}.lds-ellipsis div{position:absolute;top:27px;width:11px;height:11px;border-radius:50%;background:#888;animation-timing-function:cubic-bezier(0,1,1,0)}.lds-ellipsis div:nth-child(1){left:6px;animation:lds-ellipsis1 .6s infinite}.lds-ellipsis div:nth-child(2){left:6px;animation:lds-ellipsis2 .6s infinite}.lds-ellipsis div:nth-child(3){left:26px;animation:lds-ellipsis2 .6s infinite}.lds-ellipsis div:nth-child(4){left:45px;animation:lds-ellipsis3 .6s infinite}@keyframes lds-text{from{font-size:1em}to{font-size:1.5em}}.lds-text{position:absolute;top:50%;left:50%;margin-left:-5rem;margin-top:8rem;font-size:.8rem;letter-spacing:.25em;color:#fff}.lds-text b{font-weight:300;animation:lds-text 5s ease infinite alternate}.lds-text b:nth-child(1){animation-delay:.5s}.lds-text b:nth-child(2){animation-delay:1s}.lds-text b:nth-child(3){animation-delay:1.5s}.lds-text b:nth-child(4){animation-delay:2s}.lds-text b:nth-child(5){animation-delay:2.5s}.lds-text b:nth-child(6){animation-delay:3s}.lds-text b:nth-child(7){animation-delay:3.5s}.lds-text b:nth-child(8){animation-delay:4s}.lds-text b:nth-child(9){animation-delay:4.5s}.lds-text b:nth-child(10){animation-delay:5s}</style><div id="PageLoading"><div class="loading-spinner"><img class="logo" src="../fonts/logo.svg" width="200" alt="UI Kit"/><br/><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div><br/><div class="lds-placeholder">LOADING...</div><div class="lds-text"><b>L</b> <b>O</b> <b>A</b> <b>D</b> <b>I</b> <b>N</b> <b>G</b> <b>.</b> <b>.</b> <b>.</b></div></div></div><div id="SiteWideAlerts" class="offline-message"><div class="alert alert-danger alert-offline alert-dismissible fade show" role="alert"><div class="typography">The Internet connection is missing right now, but you're able to browse previously opened pages offline.</div><button type="button" class="btn btn-danger btn-close" data-bs-dismiss="alert" aria-label="Close"><i class="fas fa-times"></i></button></div><noscript><div class="main-bn alert alert-fixed-top alert-danger" role="alert">Please, enable javascript.</div></noscript><!--[if lt IE 11
|
||||||
]><div class="main-bn alert alert-danger" role="alert">
|
]><div class="main-bn alert alert-danger" role="alert">
|
||||||
<a
|
<a
|
||||||
href="https://www.google.com/chrome/browser/desktop/"
|
href="https://www.google.com/chrome/browser/desktop/"
|
||||||
|
2
dist/js/app.js
vendored
2
dist/js/app.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/app_sw.js
vendored
2
dist/js/app_sw.js
vendored
@ -1 +1 @@
|
|||||||
!function(){var e={4904:function(e){e.exports=function log(e){false}},4546:function(e){Cache.prototype.add||(Cache.prototype.add=function add(e){return this.addAll([e])}),Cache.prototype.addAll||(Cache.prototype.addAll=function addAll(e){var t=this;function NetworkError(e){this.name="NetworkError",this.code=19,this.message=e}return NetworkError.prototype=Object.create(Error.prototype),Promise.resolve().then((function(){if(arguments.length<1)throw new TypeError;return e=e.map((function(e){return e instanceof Request?e:String(e)})),Promise.all(e.map((function(e){"string"===typeof e&&(e=new Request(e));var t=new URL(e.url).protocol;if("http:"!==t&&"https:"!==t)throw new NetworkError("Invalid scheme");return fetch(e.clone())})))})).then((function(n){return Promise.all(n.map((function(n,r){return t.put(e[r],n)})))})).then((function(){}))}),CacheStorage.prototype.match||(CacheStorage.prototype.match=function match(e,t){var n=this;return this.keys().then((function(r){var o;return r.reduce((function(r,a){return r.then((function(){return o||n.open(a).then((function(n){return n.match(e,t)})).then((function(e){return o=e}))}))}),Promise.resolve())}))}),e.exports=self.caches}},t={};function __webpack_require__(n){if(t[n])return t[n].exports;var r=t[n]={exports:{}};return e[n](r,r.exports,__webpack_require__),r.exports}!function(){var e="".concat("@a2nt/ss-bootstrap-ui-webpack-boilerplate-react","-sw"),t="".concat("3.0.2","-sw"),n=__webpack_require__(4904),r=__webpack_require__(4546);if("string"!==typeof e)throw new Error("Cache Name cannot be empty");self.addEventListener("fetch",(function(t){if("GET"===t.request.method){var o=new URL(t.request.url);if(o.pathname.indexOf("admin")>=0||o.pathname.indexOf("Security")>=0||o.pathname.indexOf("/dev")>=0)n("SW: skip admin ".concat(t.request.url));else{var a=t.request.clone(),c=t.request.clone();t.respondWith(fetch(a).then((function(n){var o=n.clone();return r.open(e).then((function(e){var n=t.request.clone();e.put(n,o)})),n})).catch((function(e){return n("SW: fetch failed"),r.match(c)})))}}})),self.addEventListener("activate",(function(o){n("SW: activated: ".concat(t)),o.waitUntil(r.delete(e))})),self.addEventListener("install",(function(e){n("SW: installing version: ".concat(t))}))}()}();
|
!function(){var e={4904:function(e){e.exports=function log(e){false}},4546:function(e){Cache.prototype.add||(Cache.prototype.add=function add(e){return this.addAll([e])}),Cache.prototype.addAll||(Cache.prototype.addAll=function addAll(e){var t=this;function NetworkError(e){this.name="NetworkError",this.code=19,this.message=e}return NetworkError.prototype=Object.create(Error.prototype),Promise.resolve().then((function(){if(arguments.length<1)throw new TypeError;return e=e.map((function(e){return e instanceof Request?e:String(e)})),Promise.all(e.map((function(e){"string"===typeof e&&(e=new Request(e));var t=new URL(e.url).protocol;if("http:"!==t&&"https:"!==t)throw new NetworkError("Invalid scheme");return fetch(e.clone())})))})).then((function(n){return Promise.all(n.map((function(n,r){return t.put(e[r],n)})))})).then((function(){}))}),CacheStorage.prototype.match||(CacheStorage.prototype.match=function match(e,t){var n=this;return this.keys().then((function(r){var o;return r.reduce((function(r,a){return r.then((function(){return o||n.open(a).then((function(n){return n.match(e,t)})).then((function(e){return o=e}))}))}),Promise.resolve())}))}),e.exports=self.caches}},t={};function __webpack_require__(n){if(t[n])return t[n].exports;var r=t[n]={exports:{}};return e[n](r,r.exports,__webpack_require__),r.exports}!function(){var e="".concat("@a2nt/ss-bootstrap-ui-webpack-boilerplate-react","-sw"),t="".concat("3.0.3","-sw"),n=__webpack_require__(4904),r=__webpack_require__(4546);if("string"!==typeof e)throw new Error("Cache Name cannot be empty");self.addEventListener("fetch",(function(t){if("GET"===t.request.method){var o=new URL(t.request.url);if(o.pathname.indexOf("admin")>=0||o.pathname.indexOf("Security")>=0||o.pathname.indexOf("/dev")>=0)n("SW: skip admin ".concat(t.request.url));else{var a=t.request.clone(),c=t.request.clone();t.respondWith(fetch(a).then((function(n){var o=n.clone();return r.open(e).then((function(e){var n=t.request.clone();e.put(n,o)})),n})).catch((function(e){return n("SW: fetch failed"),r.match(c)})))}}})),self.addEventListener("activate",(function(o){n("SW: activated: ".concat(t)),o.waitUntil(r.delete(e))})),self.addEventListener("install",(function(e){n("SW: installing version: ".concat(t))}))}()}();
|
50
dist/records.json
vendored
50
dist/records.json
vendored
@ -70,6 +70,56 @@
|
|||||||
898
|
898
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"mini-css-extract-plugin /mnt/data/srv/dist/repositories/webpack-bootstrap-ui-kit/node_modules/.pnpm/css-loader@5.0.2_webpack@5.23.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/.pnpm/resolve-url-loader@3.1.2/node_modules/resolve-url-loader/index.js!./node_modules/.pnpm/sass-loader@11.0.1_node-sass@5.0.0+webpack@5.23.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!./node_modules/.pnpm/@a2nt/meta-lightbox-react@3.0.4/node_modules/@a2nt/meta-lightbox-react/src/scss/_window.scss": [
|
||||||
|
{
|
||||||
|
"chunks": {
|
||||||
|
"byName": {
|
||||||
|
"child": 396
|
||||||
|
},
|
||||||
|
"bySource": {
|
||||||
|
"0 child": 396
|
||||||
|
},
|
||||||
|
"usedIds": [
|
||||||
|
396
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"modules": {
|
||||||
|
"byIdentifier": {
|
||||||
|
"./node_modules/.pnpm/babel-loader@8.2.2_2c88fa80e813acf2bb735191f3f77062/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/css-loader@5.0.2_webpack@5.23.0/node_modules/css-loader/dist/runtime/api.js": 588,
|
||||||
|
"./node_modules/.pnpm/css-loader@5.0.2_webpack@5.23.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/.pnpm/resolve-url-loader@3.1.2/node_modules/resolve-url-loader/index.js!./node_modules/.pnpm/sass-loader@11.0.1_node-sass@5.0.0+webpack@5.23.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!./node_modules/.pnpm/@a2nt/meta-lightbox-react@3.0.4/node_modules/@a2nt/meta-lightbox-react/src/scss/_window.scss": 330
|
||||||
|
},
|
||||||
|
"usedIds": [
|
||||||
|
330,
|
||||||
|
588
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"mini-css-extract-plugin /mnt/data/srv/dist/repositories/webpack-bootstrap-ui-kit/node_modules/.pnpm/css-loader@5.0.2_webpack@5.23.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/.pnpm/resolve-url-loader@3.1.2/node_modules/resolve-url-loader/index.js!./node_modules/.pnpm/sass-loader@11.0.1_node-sass@5.0.0+webpack@5.23.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!./src/scss/app.scss": [
|
||||||
|
{
|
||||||
|
"chunks": {
|
||||||
|
"byName": {
|
||||||
|
"child": 396
|
||||||
|
},
|
||||||
|
"bySource": {
|
||||||
|
"0 child": 396
|
||||||
|
},
|
||||||
|
"usedIds": [
|
||||||
|
396
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"modules": {
|
||||||
|
"byIdentifier": {
|
||||||
|
"./node_modules/.pnpm/babel-loader@8.2.2_2c88fa80e813acf2bb735191f3f77062/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/css-loader@5.0.2_webpack@5.23.0/node_modules/css-loader/dist/runtime/api.js": 588,
|
||||||
|
"./node_modules/.pnpm/css-loader@5.0.2_webpack@5.23.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/.pnpm/resolve-url-loader@3.1.2/node_modules/resolve-url-loader/index.js!./node_modules/.pnpm/sass-loader@11.0.1_node-sass@5.0.0+webpack@5.23.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!./src/scss/app.scss": 714
|
||||||
|
},
|
||||||
|
"usedIds": [
|
||||||
|
588,
|
||||||
|
714
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
"modules": {
|
"modules": {
|
||||||
"byIdentifier": {
|
"byIdentifier": {
|
||||||
"./node_modules/.pnpm/babel-loader@8.2.2_2c88fa80e813acf2bb735191f3f77062/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/@apollo/client@3.3.11_graphql@15.5.0+react@17.0.1/node_modules/@apollo/client/cache/index.js|98663193128bdee4f4bd78c722201262": 5864,
|
"./node_modules/.pnpm/babel-loader@8.2.2_2c88fa80e813acf2bb735191f3f77062/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/@apollo/client@3.3.11_graphql@15.5.0+react@17.0.1/node_modules/@apollo/client/cache/index.js|98663193128bdee4f4bd78c722201262": 5864,
|
||||||
|
4
dist/report.html
vendored
4
dist/report.html
vendored
File diff suppressed because one or more lines are too long
@ -64,7 +64,7 @@ import 'bootstrap/js/dist/tab';*/
|
|||||||
// Meta Lightbox
|
// Meta Lightbox
|
||||||
import '@a2nt/meta-lightbox-react/src/js/app';
|
import '@a2nt/meta-lightbox-react/src/js/app';
|
||||||
|
|
||||||
'use strict';
|
('use strict');
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// mocking service worker
|
// mocking service worker
|
||||||
@ -72,7 +72,7 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
const { worker } = require('../mocks/browser');
|
const { worker } = require('../mocks/browser');
|
||||||
worker.start({
|
worker.start({
|
||||||
serviceWorker: {
|
serviceWorker: {
|
||||||
url: 'src/_graphql/mockServiceWorker.js',
|
url: '_graphql/mockServiceWorker.js',
|
||||||
options: {
|
options: {
|
||||||
scope: '/',
|
scope: '/',
|
||||||
},
|
},
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
// By default we prefer font awesome CDN
|
// By default we prefer font awesome CDN
|
||||||
//@import "_components/_ui.fontawesome";
|
//@import "_components/_ui.fontawesome";
|
||||||
|
|
||||||
@import '_components/_ui.lightbox';
|
//@import '_components/_ui.lightbox';
|
||||||
@import '_components/_ui.flyout';
|
//@import '_components/_ui.flyout';
|
||||||
|
|
||||||
@import '_components/_ui.main';
|
@import '_components/_ui.main';
|
||||||
//@import '_components/_ui.form.basics';
|
//@import '_components/_ui.form.basics';
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const filesystem = require('fs');
|
||||||
|
|
||||||
//const autoprefixer = require('autoprefixer');
|
//const autoprefixer = require('autoprefixer');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const { merge } = require('webpack-merge');
|
const { merge } = require('webpack-merge');
|
||||||
@ -28,6 +30,49 @@ console.log('NODE_ENV: ' + NODE_ENV);
|
|||||||
console.log('COMPRESS: ' + COMPRESS);
|
console.log('COMPRESS: ' + COMPRESS);
|
||||||
console.log('WebP images: ' + conf['webp']);
|
console.log('WebP images: ' + conf['webp']);
|
||||||
console.log('GRAPHQL_API_KEY: ' + conf['GRAPHQL_API_KEY']);
|
console.log('GRAPHQL_API_KEY: ' + conf['GRAPHQL_API_KEY']);
|
||||||
|
console.log('HTTPS: ' + conf['HTTPS']);
|
||||||
|
|
||||||
|
const plugins = [
|
||||||
|
new webpack.ProvidePlugin({
|
||||||
|
react: 'React',
|
||||||
|
'react-dom': 'ReactDOM',
|
||||||
|
/*$: 'jquery',
|
||||||
|
jQuery: 'jquery',*/
|
||||||
|
}),
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
UINAME: JSON.stringify(UIInfo.name),
|
||||||
|
UIVERSION: UIVERSION,
|
||||||
|
UIAUTHOR: JSON.stringify(UIInfo.author),
|
||||||
|
UIMetaNAME: JSON.stringify(UIMetaInfo.name),
|
||||||
|
UIMetaVersion: JSON.stringify(UIMetaInfo.version),
|
||||||
|
GRAPHQL_API_KEY: JSON.stringify(conf['GRAPHQL_API_KEY']),
|
||||||
|
SWVERSION: JSON.stringify(`sw-${new Date().getTime()}`),
|
||||||
|
BASE_HREF: JSON.stringify(
|
||||||
|
`http${conf['HTTPS'] ? 's' : ''}://${IP}:${PORT}`,
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
//new webpack.HotModuleReplacementPlugin(),
|
||||||
|
new MiniCssExtractPlugin(),
|
||||||
|
];
|
||||||
|
|
||||||
|
const indexPath = path.join(__dirname, conf.APPDIR, conf.SRC, 'index.html');
|
||||||
|
if (filesystem.existsSync(indexPath)) {
|
||||||
|
plugins.push(
|
||||||
|
new HtmlWebpackPlugin({
|
||||||
|
publicPath: '',
|
||||||
|
template: path.join(conf.APPDIR, conf.SRC, 'index.html'),
|
||||||
|
templateParameters: {
|
||||||
|
NODE_ENV: NODE_ENV,
|
||||||
|
GRAPHQL_URL: conf['GRAPHQL_URL'],
|
||||||
|
STATIC_URL: conf['STATIC_URL'],
|
||||||
|
REACT_SCRIPTS:
|
||||||
|
NODE_ENV === 'production'
|
||||||
|
? '<script crossorigin src="https://unpkg.com/react@17/umd/react.production.min.js"></script><script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>'
|
||||||
|
: '<script crossorigin src="https://unpkg.com/react@17/umd/react.development.js"></script><script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>',
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const config = merge(common, {
|
const config = merge(common, {
|
||||||
mode: 'development',
|
mode: 'development',
|
||||||
@ -44,7 +89,9 @@ const config = merge(common, {
|
|||||||
path: path.join(__dirname),
|
path: path.join(__dirname),
|
||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
// necessary for HMR to know where to load the hot update chunks
|
// necessary for HMR to know where to load the hot update chunks
|
||||||
publicPath: 'http://' + conf.HOSTNAME + ':' + conf.PORT + '/',
|
publicPath: `http${conf['HTTPS'] ? 's' : ''}://${conf['HOSTNAME']}:${
|
||||||
|
conf.PORT
|
||||||
|
}/`,
|
||||||
},
|
},
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
@ -120,59 +167,16 @@ const config = merge(common, {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: plugins,
|
||||||
new webpack.ProvidePlugin({
|
|
||||||
react: 'React',
|
|
||||||
'react-dom': 'ReactDOM',
|
|
||||||
/*$: 'jquery',
|
|
||||||
jQuery: 'jquery',
|
|
||||||
Popper: ['popper.js', 'default'],
|
|
||||||
Util: 'exports-loader?Util!bootstrap/js/dist/util',
|
|
||||||
Alert: 'exports-loader?Alert!bootstrap/js/dist/alert',
|
|
||||||
Button: 'exports-loader?Button!bootstrap/js/dist/button',
|
|
||||||
Carousel: 'exports-loader?Carousel!bootstrap/js/dist/carousel',
|
|
||||||
Collapse: 'exports-loader?Collapse!bootstrap/js/dist/collapse',
|
|
||||||
Dropdown: 'exports-loader?Dropdown!bootstrap/js/dist/dropdown',
|
|
||||||
Modal: 'exports-loader?Modal!bootstrap/js/dist/modal',
|
|
||||||
Tooltip: 'exports-loader?Tooltip!bootstrap/js/dist/tooltip',
|
|
||||||
Popover: 'exports-loader?Popover!bootstrap/js/dist/popover',
|
|
||||||
Scrollspy: 'exports-loader?Scrollspy!bootstrap/js/dist/scrollspy',
|
|
||||||
Tab: 'exports-loader?Tab!bootstrap/js/dist/tab',*/
|
|
||||||
}),
|
|
||||||
new webpack.DefinePlugin({
|
|
||||||
UINAME: JSON.stringify(UIInfo.name),
|
|
||||||
UIVERSION: UIVERSION,
|
|
||||||
UIAUTHOR: JSON.stringify(UIInfo.author),
|
|
||||||
UIMetaNAME: JSON.stringify(UIMetaInfo.name),
|
|
||||||
UIMetaVersion: JSON.stringify(UIMetaInfo.version),
|
|
||||||
GRAPHQL_API_KEY: JSON.stringify(conf['GRAPHQL_API_KEY']),
|
|
||||||
SWVERSION: JSON.stringify(`sw-${new Date().getTime()}`),
|
|
||||||
BASE_HREF: JSON.stringify(`http://${IP}:${PORT}`),
|
|
||||||
}),
|
|
||||||
//new webpack.HotModuleReplacementPlugin(),
|
|
||||||
new MiniCssExtractPlugin(),
|
|
||||||
new HtmlWebpackPlugin({
|
|
||||||
publicPath: '',
|
|
||||||
template: path.join(conf.APPDIR, conf.SRC, 'index.html'),
|
|
||||||
templateParameters: {
|
|
||||||
NODE_ENV: NODE_ENV,
|
|
||||||
GRAPHQL_URL: conf['GRAPHQL_URL'],
|
|
||||||
STATIC_URL: conf['STATIC_URL'],
|
|
||||||
REACT_SCRIPTS:
|
|
||||||
NODE_ENV === 'production'
|
|
||||||
? '<script crossorigin src="https://unpkg.com/react@17/umd/react.production.min.js"></script><script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>'
|
|
||||||
: '<script crossorigin src="https://unpkg.com/react@17/umd/react.development.js"></script><script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>',
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
|
|
||||||
devServer: {
|
devServer: {
|
||||||
host: IP,
|
host: IP,
|
||||||
port: PORT,
|
port: PORT,
|
||||||
historyApiFallback: false,
|
historyApiFallback: false,
|
||||||
|
static: path.resolve(__dirname, conf['APPDIR'], conf['SRC']),
|
||||||
// uncomment it to test caching service worker
|
https: conf['HTTPS'],
|
||||||
//injectClient: false,
|
hot: false,
|
||||||
|
injectClient: conf['injectClient'],
|
||||||
|
|
||||||
overlay: {
|
overlay: {
|
||||||
warnings: true,
|
warnings: true,
|
||||||
|
@ -13,6 +13,8 @@ Site\Templates\WebpackTemplateProvider:
|
|||||||
TYPESSCSS: src/scss/types
|
TYPESSCSS: src/scss/types
|
||||||
webp: false
|
webp: false
|
||||||
NODE_ENV: production #production,development
|
NODE_ENV: production #production,development
|
||||||
|
HTTPS: false
|
||||||
|
injectClient: true # disable it to test caching service worker
|
||||||
GRAPHQL_URL: 'http://127.0.0.1/graphql'
|
GRAPHQL_URL: 'http://127.0.0.1/graphql'
|
||||||
GRAPHQL_API_KEY: 'ApKrRSjySO4JAmX3E2Z7HvrBD0m8xdDlAiXyh4IbH3w'
|
GRAPHQL_API_KEY: 'ApKrRSjySO4JAmX3E2Z7HvrBD0m8xdDlAiXyh4IbH3w'
|
||||||
STATIC_URL: 'http://127.0.0.1'
|
STATIC_URL: 'http://127.0.0.1'
|
||||||
|
Loading…
Reference in New Issue
Block a user