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

feat: inner graph part one #4176

Merged
merged 43 commits into from
Oct 17, 2023
Merged

feat: inner graph part one #4176

merged 43 commits into from
Oct 17, 2023

Conversation

underfin
Copy link
Contributor

@underfin underfin commented Sep 12, 2023

Summary

  1. Still have some issues, I decided to compare the result with webpack after finishing the update dependency in SideEffectsFlagPlugin, e.g:
    when you commented update dependency in webpack, it would bundle reexport_entry_elimination as below:
/******/ (function() { // webpackBootstrap
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ({

/***/ "../rspack/crates/rspack/tests/tree-shaking/reexport_entry_elimination/a.js":
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   b: function() { return /* reexport safe */ _b_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }
/* harmony export */ });
/* harmony import */ var _b_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../rspack/crates/rspack/tests/tree-shaking/reexport_entry_elimination/b.js");
 
 

/***/ }),

/***/ "../rspack/crates/rspack/tests/tree-shaking/reexport_entry_elimination/b.js":
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

/* harmony import */ var _c_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../rspack/crates/rspack/tests/tree-shaking/reexport_entry_elimination/c.js");

/* harmony default export */ __webpack_exports__["default"] = (2000 + _c_js__WEBPACK_IMPORTED_MODULE_0__["default"]);

/***/ }),

/***/ "../rspack/crates/rspack/tests/tree-shaking/reexport_entry_elimination/c.js":
/***/ (function(__unused_webpack_module, __webpack_exports__) {

/* harmony default export */ __webpack_exports__["default"] = (10);

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/define property getters */
/******/ 	!function() {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = function(exports, definition) {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	!function() {
/******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ 	}();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
!function() {
/* harmony import */ var _a_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../rspack/crates/rspack/tests/tree-shaking/reexport_entry_elimination/a.js");

_a_js__WEBPACK_IMPORTED_MODULE_0__.b;
}();
/******/ })()
;

Test Plan

Require Documentation?

  • No
  • Yes, the corresponding rspack-website PR is __

@underfin underfin requested review from a team, LingyuCoder and jerrykingxyz September 12, 2023 06:07
@github-actions github-actions bot added release: feature team The issue/pr is created by the member of Rspack. labels Sep 12, 2023
@IWANABETHATGUY IWANABETHATGUY marked this pull request as draft September 12, 2023 09:07
@IWANABETHATGUY IWANABETHATGUY force-pushed the inner-graph branch 3 times, most recently from 3929cc1 to bab35d5 Compare September 26, 2023 08:37
@IWANABETHATGUY IWANABETHATGUY force-pushed the inner-graph branch 2 times, most recently from a08f3a4 to 64a26e4 Compare October 13, 2023 02:55
@IWANABETHATGUY IWANABETHATGUY force-pushed the inner-graph branch 2 times, most recently from 3943517 to 085f0de Compare October 16, 2023 07:39
@IWANABETHATGUY IWANABETHATGUY changed the title feat: inner graph feat: inner graph part one Oct 17, 2023
@github-actions github-actions bot added the release: feature release: feature related release(mr only) label Oct 17, 2023
@IWANABETHATGUY IWANABETHATGUY marked this pull request as ready for review October 17, 2023 09:54
@IWANABETHATGUY IWANABETHATGUY requested a review from a team October 17, 2023 09:54
@IWANABETHATGUY IWANABETHATGUY added this pull request to the merge queue Oct 17, 2023
Merged via the queue into main with commit fabbec4 Oct 17, 2023
13 checks passed
@IWANABETHATGUY IWANABETHATGUY deleted the inner-graph branch October 17, 2023 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants