Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: code #1840

Merged
merged 5 commits into from Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -3,5 +3,4 @@
/coverage/
npm-debug.*.log
yarn.lock
package-lock.json
npm-debug.log.*
@@ -1,13 +1,13 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[965],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[488],{

/***/ 173:
/***/ 432:
/***/ ((module, __webpack_exports__, __webpack_require__) => {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ c: () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(609);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(849);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
// Imports

Expand All @@ -20,16 +20,16 @@ ___CSS_LOADER_EXPORT___.push([module.id, "body {\n background: snow;\n}", ""]);

/***/ }),

/***/ 965:
/***/ 488:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62);
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(108);
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(173);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(432);



Expand All @@ -38,11 +38,11 @@ var options = {};
options.insert = "head";
options.singleton = false;

var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, options);
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .c, options);



/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__/* ["default"].locals */ .Z.locals || {});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .c.locals || {});

/***/ })

Expand Down
@@ -1,7 +1,7 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[219],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[980],{

/***/ 609:
/***/ 849:
/***/ ((module) => {


Expand Down Expand Up @@ -73,7 +73,7 @@ module.exports = function (cssWithMappingToString) {

/***/ }),

/***/ 62:
/***/ 108:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


Expand Down
2 changes: 1 addition & 1 deletion examples/chunk-optimization/dist/webpack-5/entryA.html
@@ -1 +1 @@
<!doctype html><html><head><meta charset="utf-8"><title>Webpack App</title><meta name="viewport" content="width=device-width,initial-scale=1"><script defer="defer" src="libMath.js"></script><script defer="defer" src="libText.js"></script><script defer="defer" src="219.js"></script><script defer="defer" src="965.js"></script><script defer="defer" src="entryA.js"></script></head><body></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>Webpack App</title><meta name="viewport" content="width=device-width,initial-scale=1"><script defer="defer" src="libMath.js"></script><script defer="defer" src="libText.js"></script><script defer="defer" src="980.js"></script><script defer="defer" src="488.js"></script><script defer="defer" src="entryA.js"></script></head><body></body></html>
12 changes: 6 additions & 6 deletions examples/chunk-optimization/dist/webpack-5/entryA.js
@@ -1,12 +1,12 @@
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({

/***/ 727:
/***/ 67:
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

__webpack_require__(965);
var multiply = __webpack_require__(179);
var concat = __webpack_require__(631);
__webpack_require__(488);
var multiply = __webpack_require__(540);
var concat = __webpack_require__(280);
var h1 = document.createElement('h1');
h1.innerHTML = concat('Hello world from Entry ', multiply(1, 1));
document.body.appendChild(h1);
Expand Down Expand Up @@ -124,7 +124,7 @@ document.body.appendChild(h1);
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ 938: 0
/******/ 568: 0
/******/ };
/******/
/******/ // no chunk on demand loading
Expand Down Expand Up @@ -179,7 +179,7 @@ document.body.appendChild(h1);
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, [494,491,219,965], () => (__webpack_require__(727)))
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, [288,8,980,488], () => (__webpack_require__(67)))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
Expand Down
2 changes: 1 addition & 1 deletion examples/chunk-optimization/dist/webpack-5/entryB.html
@@ -1 +1 @@
<!doctype html><html><head><meta charset="utf-8"><title>Webpack App</title><meta name="viewport" content="width=device-width,initial-scale=1"><script defer="defer" src="libMath.js"></script><script defer="defer" src="219.js"></script><script defer="defer" src="965.js"></script><script defer="defer" src="entryB.js"></script></head><body></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>Webpack App</title><meta name="viewport" content="width=device-width,initial-scale=1"><script defer="defer" src="libMath.js"></script><script defer="defer" src="980.js"></script><script defer="defer" src="488.js"></script><script defer="defer" src="entryB.js"></script></head><body></body></html>
10 changes: 5 additions & 5 deletions examples/chunk-optimization/dist/webpack-5/entryB.js
@@ -1,11 +1,11 @@
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({

/***/ 282:
/***/ 304:
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

__webpack_require__(965);
var multiply = __webpack_require__(179);
__webpack_require__(488);
var multiply = __webpack_require__(540);
var h1 = document.createElement('h1');
h1.innerHTML = 'Hello world from Entry ' + multiply(1, 2);
document.body.appendChild(h1);
Expand Down Expand Up @@ -123,7 +123,7 @@ document.body.appendChild(h1);
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ 513: 0
/******/ 758: 0
/******/ };
/******/
/******/ // no chunk on demand loading
Expand Down Expand Up @@ -178,7 +178,7 @@ document.body.appendChild(h1);
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, [494,219,965], () => (__webpack_require__(282)))
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, [288,980,488], () => (__webpack_require__(304)))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
Expand Down
2 changes: 1 addition & 1 deletion examples/chunk-optimization/dist/webpack-5/entryC.html
@@ -1 +1 @@
<!doctype html><html><head><meta charset="utf-8"><title>Webpack App</title><meta name="viewport" content="width=device-width,initial-scale=1"><script defer="defer" src="libMath.js"></script><script defer="defer" src="libText.js"></script><script defer="defer" src="219.js"></script><script defer="defer" src="965.js"></script><script defer="defer" src="entryA.js"></script><script defer="defer" src="entryB.js"></script></head><body></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>Webpack App</title><meta name="viewport" content="width=device-width,initial-scale=1"><script defer="defer" src="libMath.js"></script><script defer="defer" src="libText.js"></script><script defer="defer" src="980.js"></script><script defer="defer" src="488.js"></script><script defer="defer" src="entryA.js"></script><script defer="defer" src="entryB.js"></script></head><body></body></html>
8 changes: 4 additions & 4 deletions examples/chunk-optimization/dist/webpack-5/libMath.js
@@ -1,9 +1,9 @@
(self["webpackChunk"] = self["webpackChunk"] || []).push([[494],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[288],{

/***/ 179:
/***/ 540:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var sum = __webpack_require__(971);
var sum = __webpack_require__(636);
module.exports = function multiply (a, b) {
var m = 0;
for (var i = 0; i < a; i = sum(i, 1)) {
Expand All @@ -15,7 +15,7 @@ module.exports = function multiply (a, b) {

/***/ }),

/***/ 971:
/***/ 636:
/***/ ((module) => {

module.exports = function sum (a, b) {
Expand Down
4 changes: 2 additions & 2 deletions examples/chunk-optimization/dist/webpack-5/libText.js
@@ -1,6 +1,6 @@
(self["webpackChunk"] = self["webpackChunk"] || []).push([[491],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[8],{

/***/ 631:
/***/ 280:
/***/ ((module) => {

module.exports = function concat (a, b) {
Expand Down
4 changes: 2 additions & 2 deletions examples/custom-template/dist/webpack-5/bundle.js
@@ -1,7 +1,7 @@
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({

/***/ 636:
/***/ 268:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
Expand Down Expand Up @@ -53,7 +53,7 @@ __webpack_require__.r(__webpack_exports__);
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
__webpack_require__(636);
__webpack_require__(268);
var h1 = document.createElement('h1');
h1.innerHTML = 'Hello world!';
document.body.appendChild(h1);
Expand Down
22 changes: 11 additions & 11 deletions examples/default/dist/webpack-5/bundle.js
@@ -1,14 +1,14 @@
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({

/***/ 173:
/***/ 432:
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ c: () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(609);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(849);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
// Imports

Expand All @@ -21,7 +21,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, "body {\n background: snow;\n}", ""]);

/***/ }),

/***/ 609:
/***/ 849:
/***/ ((module) => {

"use strict";
Expand Down Expand Up @@ -94,17 +94,17 @@ module.exports = function (cssWithMappingToString) {

/***/ }),

/***/ 965:
/***/ 488:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62);
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(108);
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(173);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(432);



Expand All @@ -113,15 +113,15 @@ var options = {};
options.insert = "head";
options.singleton = false;

var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, options);
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .c, options);



/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z.locals || {});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_main_css__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .c.locals || {});

/***/ }),

/***/ 62:
/***/ 108:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
Expand Down Expand Up @@ -473,7 +473,7 @@ module.exports = function (list, options) {
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
__webpack_require__(965);
__webpack_require__(488);
var h1 = document.createElement('h1');
h1.innerHTML = 'Hello world!';
document.body.appendChild(h1);
Expand Down
4 changes: 2 additions & 2 deletions examples/favicon/dist/webpack-5/bundle.js
@@ -1,7 +1,7 @@
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({

/***/ 636:
/***/ 268:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
Expand Down Expand Up @@ -53,7 +53,7 @@ __webpack_require__.r(__webpack_exports__);
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
__webpack_require__(636);
__webpack_require__(268);
var h1 = document.createElement('h1');
h1.innerHTML = 'Hello world!';
document.body.appendChild(h1);
Expand Down
4 changes: 2 additions & 2 deletions examples/html-loader/dist/webpack-5/bundle.js
@@ -1,7 +1,7 @@
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({

/***/ 636:
/***/ 268:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
Expand Down Expand Up @@ -53,7 +53,7 @@ __webpack_require__.r(__webpack_exports__);
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
__webpack_require__(636);
__webpack_require__(268);
var h1 = document.createElement('h1');
h1.innerHTML = 'Hello world!';
document.body.appendChild(h1);
Expand Down
4 changes: 2 additions & 2 deletions examples/inline/dist/webpack-5/bundle.js
Expand Up @@ -2,7 +2,7 @@
/******/ "use strict";
/******/ var __webpack_modules__ = ({

/***/ 636:
/***/ 268:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
Expand Down Expand Up @@ -54,7 +54,7 @@ var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {

__webpack_require__(636);
__webpack_require__(268);

console.log('Hello World');

Expand Down
4 changes: 2 additions & 2 deletions examples/inline/dist/webpack-5/index.html
Expand Up @@ -4,7 +4,7 @@
/******/ "use strict";
/******/ var __webpack_modules__ = ({

/***/ 636:
/***/ 268:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
Expand Down Expand Up @@ -56,7 +56,7 @@
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {

__webpack_require__(636);
__webpack_require__(268);

console.log('Hello World');

Expand Down
10 changes: 5 additions & 5 deletions examples/javascript-advanced/dist/webpack-5/bundle.js
Expand Up @@ -9,22 +9,22 @@
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({

/***/ 144:
/***/ 968:
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

eval("__webpack_require__(636);\n\nvar universal = __webpack_require__(184);\nvar h1 = document.createElement('h1');\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//# sourceURL=webpack:///./example.js?");
eval("__webpack_require__(268);\n\nvar universal = __webpack_require__(180);\nvar h1 = document.createElement('h1');\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//# sourceURL=webpack:///./example.js?");

/***/ }),

/***/ 184:
/***/ 180:
/***/ ((module) => {

"use strict";
eval("// This file is used for frontend and backend\n\n\n// If compiled by the html-webpack-plugin\n// HTML_WEBPACK_PLUGIN is set to true:\nvar backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined';\n\nmodule.exports = function () {\n return 'Hello World from ' + (backend ? 'backend' : 'frontend');\n};\n\n\n//# sourceURL=webpack:///./universial.js?");

/***/ }),

/***/ 636:
/***/ 268:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
Expand Down Expand Up @@ -75,7 +75,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extr
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module can't be inlined because the eval devtool is used.
/******/ var __webpack_exports__ = __webpack_require__(144);
/******/ var __webpack_exports__ = __webpack_require__(968);
/******/
/******/ })()
;