Skip to content

Commit

Permalink
feat: remove transform by default (#5185)
Browse files Browse the repository at this point in the history
  • Loading branch information
h-a-n-a authored and ahabhgk committed Jan 3, 2024
1 parent dc80a19 commit 9d36121
Show file tree
Hide file tree
Showing 169 changed files with 350 additions and 3,097 deletions.
1 change: 0 additions & 1 deletion crates/node_binding/binding.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,6 @@ export interface RawResolveTsconfigOptions {

export interface RawRspackFuture {
newTreeshaking: boolean
disableTransformByDefault: boolean
}

export interface RawRuleSetCondition {
Expand Down
1 change: 0 additions & 1 deletion crates/rspack/tests/fixtures/simple-with-query/b.js

This file was deleted.

1 change: 0 additions & 1 deletion crates/rspack/tests/fixtures/simple-with-query/b.jsx

This file was deleted.

5 changes: 0 additions & 5 deletions crates/rspack/tests/fixtures/simple-with-query/index.js

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,28 @@ source: crates/rspack_testing/src/run_fixture.rs
---
```js title=main.js
(self['webpackChunkwebpack'] = self['webpackChunkwebpack'] || []).push([["main"], {
"./zh_locale.js": (function (__unused_webpack_module, exports) {
var __webpack_unused_export__;
"use strict";
__webpack_unused_export__ = ({
value: true
});
exports["default"] = void 0;
/* eslint-disable no-template-curly-in-string */ var _default = {};
exports["default"] = _default;
}),
"./antd/index.ts": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"./antd/index.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
locales: function() { return locales; }
});
/* harmony import */var _locale_zh__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../locale_zh */"./locale_zh.ts");
/* harmony import */var _locale_zh__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../locale_zh */"./locale_zh.js");
const locales = {
zh_CN: _locale_zh__WEBPACK_IMPORTED_MODULE_0__["default"]
};
}),
"./index.ts": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"./index.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */var _antd_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./antd/index */"./antd/index.ts");
/* harmony import */var _antd_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./antd/index */"./antd/index.js");
_antd_index__WEBPACK_IMPORTED_MODULE_0__.locales.zh_CN;
function test() {}
}),
"./locale_zh.ts": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"./locale_zh.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Expand All @@ -44,10 +34,20 @@ __webpack_require__.d(__webpack_exports__, {
var __WEBPACK_DEFAULT_EXPORT__ = _zh_locale__WEBPACK_IMPORTED_MODULE_0__["default"];
}),
"./zh_locale.js": (function (__unused_webpack_module, exports) {
var __webpack_unused_export__;
"use strict";
__webpack_unused_export__ = ({
value: true
});
exports["default"] = void 0;
/* eslint-disable no-template-curly-in-string */ var _default = {};
exports["default"] = _default;
}),
},function(__webpack_require__) {
var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId) }
var __webpack_exports__ = (__webpack_exec__("./index.ts"));
var __webpack_exports__ = (__webpack_exec__("./index.js"));
}
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,31 @@ source: crates/rspack_testing/src/run_fixture.rs
---
```js title=main.js
(self['webpackChunkwebpack'] = self['webpackChunkwebpack'] || []).push([["main"], {
"./zh_locale.js": (function (__unused_webpack_module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
/* eslint-disable no-template-curly-in-string */ var _default = {};
exports["default"] = _default;
}),
"./antd/index.ts": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"./antd/index.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
locales: function() { return locales; }
});
/* harmony import */var _locale_zh__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../locale_zh */"./locale_zh.ts");
/* harmony import */var _locale_zh__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../locale_zh */"./locale_zh.js");
const locales = {
zh_CN: _locale_zh__WEBPACK_IMPORTED_MODULE_0__["default"]
};
}),
"./index.ts": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"./index.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
test: function() { return test; }
});
/* harmony import */var _antd_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./antd/index */"./antd/index.ts");
/* harmony import */var _antd_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./antd/index */"./antd/index.js");
_antd_index__WEBPACK_IMPORTED_MODULE_0__.locales.zh_CN;
function test() {}
}),
"./locale_zh.ts": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"./locale_zh.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
Expand All @@ -46,10 +37,19 @@ __webpack_require__.d(__webpack_exports__, {
var __WEBPACK_DEFAULT_EXPORT__ = _zh_locale__WEBPACK_IMPORTED_MODULE_0__["default"];
}),
"./zh_locale.js": (function (__unused_webpack_module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
/* eslint-disable no-template-curly-in-string */ var _default = {};
exports["default"] = _default;
}),
},function(__webpack_require__) {
var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId) }
var __webpack_exports__ = (__webpack_exec__("./index.ts"));
var __webpack_exports__ = (__webpack_exec__("./index.js"));
}
]);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
--- expected
+++ actual
@@ -4,10 +4,11 @@
```js title=main.js
(self['webpackChunkwebpack'] = self['webpackChunkwebpack'] || []).push([["main"], {
@@ -19,9 +19,6 @@
"./index.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-__webpack_require__.d(__webpack_exports__, {
- test: function() { return test; }
-});
/* harmony import */var _antd_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./antd/index */"./antd/index.js");

_antd_index__WEBPACK_IMPORTED_MODULE_0__.locales.zh_CN;
@@ -38,10 +35,11 @@
var __WEBPACK_DEFAULT_EXPORT__ = _zh_locale__WEBPACK_IMPORTED_MODULE_0__["default"];
}),
"./zh_locale.js": (function (__unused_webpack_module, exports) {
+var __webpack_unused_export__;
"use strict";
Expand All @@ -14,13 +24,3 @@
exports["default"] = void 0;
/* eslint-disable no-template-curly-in-string */ var _default = {};
exports["default"] = _default;
@@ -28,9 +29,6 @@
"./index.ts": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-__webpack_require__.d(__webpack_exports__, {
- test: function() { return test; }
-});
/* harmony import */var _antd_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./antd/index */"./antd/index.ts");

_antd_index__WEBPACK_IMPORTED_MODULE_0__.locales.zh_CN;
Original file line number Diff line number Diff line change
Expand Up @@ -7,69 +7,26 @@ source: crates/rspack_testing/src/run_fixture.rs
__webpack_require__(/*! ./source */"./source/index.js");
console.log('something');
}),
"./source/index.js": (function (module, __unused_webpack_exports, __webpack_require__) {
var _class_call_check = __webpack_require__(/*! @swc/helpers/_/_class_call_check */"../../../../../node_modules/@swc/helpers/esm/_class_call_check.js");
var _create_class = __webpack_require__(/*! @swc/helpers/_/_create_class */"../../../../../node_modules/@swc/helpers/esm/_create_class.js");
var Response = function() {
"use strict";
function Response(mode) {
_class_call_check._(this, Response);
"./source/index.js": (function (module) {
class Response {
/**
* @param {CompiledMode} mode
*/ constructor(mode){
// eslint-disable-next-line no-undefined
if (mode.data === undefined) mode.data = {};
this.data = mode.data;
this.isMatchIgnored = false;
}
_create_class._(Response, [
{
key: "ignoreMatch",
value: function ignoreMatch() {
this.isMatchIgnored = true;
}
}
]);
return Response;
}();
ignoreMatch() {
this.isMatchIgnored = true;
}
}
function test() {
var res = new Response();
let res = new Response();
return res;
}
var result = test();
const result = test();
module.exports = result;
}),
"../../../../../node_modules/@swc/helpers/esm/_class_call_check.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
_: function() { return _class_call_check; },
_class_call_check: function() { return _class_call_check; }
});
function _class_call_check(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
}),
"../../../../../node_modules/@swc/helpers/esm/_create_class.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
_: function() { return _create_class; },
_create_class: function() { return _create_class; }
});
function _defineProperties(target, props) {
for(var i = 0; i < props.length; i++){
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
function _create_class(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
return Constructor;
}
}),
},function(__webpack_require__) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,69 +7,26 @@ source: crates/rspack_testing/src/run_fixture.rs
__webpack_require__(/*! ./source */"./source/index.js");
console.log('something');
}),
"./source/index.js": (function (module, __unused_webpack_exports, __webpack_require__) {
var _class_call_check = __webpack_require__(/*! @swc/helpers/_/_class_call_check */"../../../../../node_modules/@swc/helpers/esm/_class_call_check.js");
var _create_class = __webpack_require__(/*! @swc/helpers/_/_create_class */"../../../../../node_modules/@swc/helpers/esm/_create_class.js");
var Response = function() {
"use strict";
function Response(mode) {
_class_call_check._(this, Response);
"./source/index.js": (function (module) {
class Response {
/**
* @param {CompiledMode} mode
*/ constructor(mode){
// eslint-disable-next-line no-undefined
if (mode.data === undefined) mode.data = {};
this.data = mode.data;
this.isMatchIgnored = false;
}
_create_class._(Response, [
{
key: "ignoreMatch",
value: function ignoreMatch() {
this.isMatchIgnored = true;
}
}
]);
return Response;
}();
ignoreMatch() {
this.isMatchIgnored = true;
}
}
function test() {
var res = new Response();
let res = new Response();
return res;
}
var result = test();
const result = test();
module.exports = result;
}),
"../../../../../node_modules/@swc/helpers/esm/_class_call_check.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
_: function() { return _class_call_check; },
_class_call_check: function() { return _class_call_check; }
});
function _class_call_check(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
}),
"../../../../../node_modules/@swc/helpers/esm/_create_class.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
_: function() { return _create_class; },
_create_class: function() { return _create_class; }
});
function _defineProperties(target, props) {
for(var i = 0; i < props.length; i++){
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
function _create_class(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
return Constructor;
}
}),
},function(__webpack_require__) {
Expand Down
Loading

0 comments on commit 9d36121

Please sign in to comment.