diff --git a/e2e/cases/alias/__snapshots__/index.test.ts.snap b/e2e/cases/alias/__snapshots__/index.test.ts.snap index 6ab389f6e..9b029c368 100644 --- a/e2e/cases/alias/__snapshots__/index.test.ts.snap +++ b/e2e/cases/alias/__snapshots__/index.test.ts.snap @@ -1,46 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`alias should work 1`] = ` -"var __webpack_modules__ = ({}); -/************************************************************************/ -// 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] = { -exports: {} -}); -// Execute the module function -__webpack_modules__[moduleId](module, module.exports, __webpack_require__); - -// Return the exports of the module -return module.exports; - -} - -/************************************************************************/ -// webpack/runtime/rspack_version -(() => { -__webpack_require__.rv = function () { - return "1.0.0-canary-0b368b6-20240704171208"; -}; - -})(); -// webpack/runtime/rspack_unique_id -(() => { -__webpack_require__.ruid = "bundler=rspack@1.0.0-canary-0b368b6-20240704171208"; - -})(); -/************************************************************************/ -var __webpack_exports__ = {}; +"var __webpack_exports__ = {}; ;// CONCATENATED MODULE: ./e2e/cases/alias/src/a.ts const a = 'hello world'; @@ -56,45 +17,6 @@ export { a }; exports[`alias should work 2`] = ` "(() => { // webpackBootstrap "use strict"; -var __webpack_modules__ = ({}); -/************************************************************************/ -// 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] = { -exports: {} -}); -// Execute the module function -__webpack_modules__[moduleId](module, module.exports, __webpack_require__); - -// Return the exports of the module -return module.exports; - -} - -/************************************************************************/ -// webpack/runtime/rspack_version -(() => { -__webpack_require__.rv = function () { - return "1.0.0-canary-0b368b6-20240704171208"; -}; - -})(); -// webpack/runtime/rspack_unique_id -(() => { -__webpack_require__.ruid = "bundler=rspack@1.0.0-canary-0b368b6-20240704171208"; - -})(); -/************************************************************************/ var __webpack_exports__ = {}; ;// CONCATENATED MODULE: ./e2e/cases/alias/src/a.ts diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index 75d2d69fa..1cf200d24 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -80,6 +80,15 @@ export async function createInternalRsbuildConfig(): Promise { }, tools: { htmlPlugin: false, + rspack: { + experiments: { + rspackFuture: { + bundlerInfo: { + force: false, + }, + }, + }, + }, }, output: { filenameHash: false, diff --git a/packages/core/tests/__snapshots__/config.test.ts.snap b/packages/core/tests/__snapshots__/config.test.ts.snap index b3d4a5827..95b5c55f1 100644 --- a/packages/core/tests/__snapshots__/config.test.ts.snap +++ b/packages/core/tests/__snapshots__/config.test.ts.snap @@ -30,6 +30,13 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1 "tools": { "htmlPlugin": false, "rspack": { + "experiments": { + "rspackFuture": { + "bundlerInfo": { + "force": false, + }, + }, + }, "externalsType": "commonjs", "output": { "library": { @@ -65,6 +72,11 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1 "rspack": { "experiments": { "outputModule": true, + "rspackFuture": { + "bundlerInfo": { + "force": false, + }, + }, }, "externalsType": "module", "optimization": { @@ -104,6 +116,13 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config 1 "tools": { "htmlPlugin": false, "rspack": { + "experiments": { + "rspackFuture": { + "bundlerInfo": { + "force": false, + }, + }, + }, "externalsType": "umd", "output": { "library": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d16b9ff0a..49bef0c65 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -88,6 +88,10 @@ importers: specifier: ^11.2.0 version: 11.2.0 + e2e/cases/autoExtension/type-commonjs: {} + + e2e/cases/autoExtension/type-module: {} + examples/basic: devDependencies: '@rslib/core':