-
-
Notifications
You must be signed in to change notification settings - Fork 578
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: π€ pass more tree shaking tests (#4787)
* chore: π€ enable more tests * chore: π€ fix extends class * chore: π€ enable more test * test: π chore enable more test * chore: π€ align with webpack * chore: π€ update test.config.js * chore: π€ update check.js * chore: π€ fmt * chore: π€ clean * chore: π€ update snapshot
- Loading branch information
1 parent
07e0356
commit 8d6af5e
Showing
84 changed files
with
757 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
webpack-test/cases/cjs-tree-shaking/cjs-to-esm/test.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/**@type {import("@rspack/cli").Configuration} */ | ||
const config = { | ||
experiments: { | ||
rspackFuture: { | ||
newTreeshaking: true, | ||
}, | ||
}, | ||
builtins: { | ||
treeShaking: false, | ||
}, | ||
}; | ||
module.exports = config; |
12 changes: 12 additions & 0 deletions
12
webpack-test/cases/cjs-tree-shaking/esModule-getter/test.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/**@type {import("@rspack/cli").Configuration} */ | ||
const config = { | ||
experiments: { | ||
rspackFuture: { | ||
newTreeshaking: true, | ||
}, | ||
}, | ||
builtins: { | ||
treeShaking: false, | ||
}, | ||
}; | ||
module.exports = config; |
12 changes: 12 additions & 0 deletions
12
webpack-test/cases/cjs-tree-shaking/esm-to-cjs/test.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/**@type {import("@rspack/cli").Configuration} */ | ||
const config = { | ||
experiments: { | ||
rspackFuture: { | ||
newTreeshaking: true, | ||
}, | ||
}, | ||
builtins: { | ||
treeShaking: false, | ||
}, | ||
}; | ||
module.exports = config; |
12 changes: 12 additions & 0 deletions
12
webpack-test/cases/cjs-tree-shaking/exports/test.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/**@type {import("@rspack/cli").Configuration} */ | ||
const config = { | ||
experiments: { | ||
rspackFuture: { | ||
newTreeshaking: true, | ||
}, | ||
}, | ||
builtins: { | ||
treeShaking: false, | ||
}, | ||
}; | ||
module.exports = config; |
12 changes: 12 additions & 0 deletions
12
webpack-test/cases/cjs-tree-shaking/importing/test.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/**@type {import("@rspack/cli").Configuration} */ | ||
const config = { | ||
experiments: { | ||
rspackFuture: { | ||
newTreeshaking: true, | ||
}, | ||
}, | ||
builtins: { | ||
treeShaking: false, | ||
}, | ||
}; | ||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/**@type {import("@rspack/cli").Configuration} */ | ||
const config = { | ||
experiments: { | ||
rspackFuture: { | ||
newTreeshaking: true, | ||
}, | ||
}, | ||
builtins: { | ||
treeShaking: false, | ||
}, | ||
}; | ||
module.exports = config; |
12 changes: 12 additions & 0 deletions
12
webpack-test/cases/cjs-tree-shaking/namespace/test.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/**@type {import("@rspack/cli").Configuration} */ | ||
const config = { | ||
experiments: { | ||
rspackFuture: { | ||
newTreeshaking: true, | ||
}, | ||
}, | ||
builtins: { | ||
treeShaking: false, | ||
}, | ||
}; | ||
module.exports = config; |
12 changes: 12 additions & 0 deletions
12
webpack-test/cases/cjs-tree-shaking/non-root-this/test.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/**@type {import("@rspack/cli").Configuration} */ | ||
const config = { | ||
experiments: { | ||
rspackFuture: { | ||
newTreeshaking: true, | ||
}, | ||
}, | ||
builtins: { | ||
treeShaking: false, | ||
}, | ||
}; | ||
module.exports = config; |
12 changes: 12 additions & 0 deletions
12
webpack-test/cases/cjs-tree-shaking/object-define-property-replace/test.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/**@type {import("@rspack/cli").Configuration} */ | ||
const config = { | ||
experiments: { | ||
rspackFuture: { | ||
newTreeshaking: true, | ||
}, | ||
}, | ||
builtins: { | ||
treeShaking: false, | ||
}, | ||
}; | ||
module.exports = config; |
12 changes: 12 additions & 0 deletions
12
webpack-test/cases/cjs-tree-shaking/objects/test.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/**@type {import("@rspack/cli").Configuration} */ | ||
const config = { | ||
experiments: { | ||
rspackFuture: { | ||
newTreeshaking: true, | ||
}, | ||
}, | ||
builtins: { | ||
treeShaking: false, | ||
}, | ||
}; | ||
module.exports = config; |
12 changes: 12 additions & 0 deletions
12
webpack-test/cases/cjs-tree-shaking/parsing/test.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/**@type {import("@rspack/cli").Configuration} */ | ||
const config = { | ||
experiments: { | ||
rspackFuture: { | ||
newTreeshaking: true, | ||
}, | ||
}, | ||
builtins: { | ||
treeShaking: false, | ||
}, | ||
}; | ||
module.exports = config; |
12 changes: 12 additions & 0 deletions
12
webpack-test/cases/cjs-tree-shaking/reexports/test.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/**@type {import("@rspack/cli").Configuration} */ | ||
const config = { | ||
experiments: { | ||
rspackFuture: { | ||
newTreeshaking: true, | ||
}, | ||
}, | ||
builtins: { | ||
treeShaking: false, | ||
}, | ||
}; | ||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
module.exports = () => {return "https://github.com/web-infra-dev/rspack/issues/4325"} | ||
|
||
|
12 changes: 12 additions & 0 deletions
12
webpack-test/cases/cjs-tree-shaking/transpiled/test.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/**@type {import("@rspack/cli").Configuration} */ | ||
const config = { | ||
experiments: { | ||
rspackFuture: { | ||
newTreeshaking: true, | ||
}, | ||
}, | ||
builtins: { | ||
treeShaking: false, | ||
}, | ||
}; | ||
module.exports = config; |
Oops, something went wrong.