diff --git a/test/configCases/asset-modules/http-url/dev-defaults.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_README_c9ec0fd496c92f077657.md b/test/configCases/asset-modules/http-url/dev-defaults.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_README_c9ec0fd496c92f077657.md index 109f95ac4..fc5b1ec7d 100644 --- a/test/configCases/asset-modules/http-url/dev-defaults.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_README_c9ec0fd496c92f077657.md +++ b/test/configCases/asset-modules/http-url/dev-defaults.webpack.lock.data/https_raw.githubusercontent.com/webpack_webpack_main_README_c9ec0fd496c92f077657.md @@ -1,9 +1,9 @@
- - - -
-
+ + + +
+
[![npm][npm]][npm-url] @@ -22,10 +22,10 @@ [![discord](https://img.shields.io/discord/1180618526436888586?label=discord&logo=discord&logoColor=white&style=flat)](https://discord.gg/5sxFZPdx2k) [![LFX Health Score](https://insights.linuxfoundation.org/api/badge/health-score?project=webpack)](https://insights.linuxfoundation.org/project/webpack) -

webpack

-

- Webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset. -

+

webpack

+

+ Webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset. +

## Table of Contents @@ -36,14 +36,14 @@ - [Contributing](#contributing) - [Support](#support) - [Current project members](#current-project-members) - - [TSC (Technical Steering Committee)](#tsc-technical-steering-committee) - - [Core Collaborators](#core-collaborators) + - [TSC (Technical Steering Committee)](#tsc-technical-steering-committee) + - [Core Collaborators](#core-collaborators) - [Sponsoring](#sponsoring) - - [Premium Partners](#premium-partners) - - [Gold Sponsors](#gold-sponsors) - - [Silver Sponsors](#silver-sponsors) - - [Bronze Sponsors](#bronze-sponsors) - - [Backers](#backers) + - [Premium Partners](#premium-partners) + - [Gold Sponsors](#gold-sponsors) + - [Silver Sponsors](#silver-sponsors) + - [Bronze Sponsors](#bronze-sponsors) + - [Backers](#backers) - [Special Thanks](#special-thanks-to) ## Install @@ -303,15 +303,15 @@ For information about the governance of the webpack project, see [GOVERNANCE.md] ### TSC (Technical Steering Committee) - [alexander-akait](https://github.com/alexander-akait) - - **Alexander Akait** <> (he/him) + **Alexander Akait** <> (he/him) - [evenstensberg](https://github.com/evenstensberg) - - **Even Stensberg** <> (he/him) + **Even Stensberg** <> (he/him) - [ovflowd](https://github.com/ovflowd) - - **Claudio Wunder** <> (he/they) + **Claudio Wunder** <> (he/they) - [snitin315](https://github.com/snitin315) - - **Nitin Kumar** <> (he/him) + **Nitin Kumar** <> (he/him) - [thelarkinn](https://github.com/thelarkinn) - - **Sean Larkin** <> (he/him) + **Sean Larkin** <> (he/him) ### Maintenance diff --git a/test/configCases/target/system-default-import-fix/index.js b/test/configCases/target/system-default-import-fix/index.js deleted file mode 100644 index 83e9d9f92..000000000 --- a/test/configCases/target/system-default-import-fix/index.js +++ /dev/null @@ -1,19 +0,0 @@ -import React, { useEffect } from "react"; - -/* This test verifies that default imports work correctly with SystemJS externals - * when the external module doesn't have a default property (e.g., React) - */ - -it("should correctly handle default import from SystemJS external", function() { - // React should be the entire module object, not undefined - expect(React).toBeDefined(); - expect(typeof React).toBe("object"); - expect(React.Component).toBeDefined(); - expect(React.Fragment).toBeDefined(); - - // Named imports should still work - expect(typeof useEffect).toBe("function"); - - // The default import should not be undefined - expect(React).not.toBeUndefined(); -}); diff --git a/test/configCases/target/system-default-import-fix/react-with-default.js b/test/configCases/target/system-default-import-fix/react-with-default.js deleted file mode 100644 index f8e36b12e..000000000 --- a/test/configCases/target/system-default-import-fix/react-with-default.js +++ /dev/null @@ -1,26 +0,0 @@ -// Mock React module that HAS a default property -// This simulates ES6 modules with default exports -const React = { - Component: function Component() {}, - Fragment: Symbol("react.fragment"), - Profiler: Symbol("react.profiler"), - useEffect: function useEffect(callback, deps) { - return callback(); - }, - useState: function useState(initial) { - return [initial, function() {}]; - }, - createElement: function createElement(type, props, ...children) { - return { type, props, children }; - } -}; - -// Export with default property (ES6 module format) -module.exports = React; -module.exports.default = React; -module.exports.useEffect = React.useEffect; -module.exports.Component = React.Component; -module.exports.Fragment = React.Fragment; -module.exports.Profiler = React.Profiler; -module.exports.useState = React.useState; -module.exports.createElement = React.createElement; diff --git a/test/configCases/target/system-default-import-fix/react.js b/test/configCases/target/system-default-import-fix/react.js deleted file mode 100644 index 2b59fb098..000000000 --- a/test/configCases/target/system-default-import-fix/react.js +++ /dev/null @@ -1,25 +0,0 @@ -// Mock React module that doesn't have a default property -// This simulates how React is typically exported in SystemJS environments -const React = { - Component: function Component() {}, - Fragment: Symbol("react.fragment"), - Profiler: Symbol("react.profiler"), - useEffect: function useEffect(callback, deps) { - return callback(); - }, - useState: function useState(initial) { - return [initial, function() {}]; - }, - createElement: function createElement(type, props, ...children) { - return { type, props, children }; - } -}; - -// Export named exports (SystemJS style - no default property) -module.exports = React; -module.exports.useEffect = React.useEffect; -module.exports.Component = React.Component; -module.exports.Fragment = React.Fragment; -module.exports.Profiler = React.Profiler; -module.exports.useState = React.useState; -module.exports.createElement = React.createElement; diff --git a/test/configCases/target/system-default-import-fix/test.config.js b/test/configCases/target/system-default-import-fix/test.config.js deleted file mode 100644 index 7d86e2c73..000000000 --- a/test/configCases/target/system-default-import-fix/test.config.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -const path = require("path"); - -/** @type {import("../../../../").Configuration} */ -module.exports = { - entry: "./test.js", - output: { - path: path.resolve(__dirname, "dist"), - filename: "bundle.js", - libraryTarget: "system" - }, - externals: { - react: "react", - "react-with-default": "react-with-default" - }, - resolve: { - alias: { - react: path.resolve(__dirname, "react.js"), - "react-with-default": path.resolve(__dirname, "react-with-default.js") - } - }, - node: { - __dirname: false, - __filename: false - } -}; diff --git a/test/configCases/target/system-default-import-fix/test.js b/test/configCases/target/system-default-import-fix/test.js deleted file mode 100644 index d01378be1..000000000 --- a/test/configCases/target/system-default-import-fix/test.js +++ /dev/null @@ -1,36 +0,0 @@ -import React, { useEffect } from "react"; -import ReactWithDefault, { useEffect as useEffectWithDefault } from "react-with-default"; - -/* This test verifies that default imports work correctly with SystemJS externals - * in both scenarios: - * 1. External module without default property (traditional SystemJS) - * 2. External module with default property (ES6 module format) - */ - -it("should correctly handle default import from SystemJS external without default property", function() { - // React should be the entire module object, not undefined - expect(React).toBeDefined(); - expect(typeof React).toBe("object"); - expect(React.Component).toBeDefined(); - expect(React.Fragment).toBeDefined(); - - // Named imports should still work - expect(typeof useEffect).toBe("function"); - - // The default import should not be undefined - expect(React).not.toBeUndefined(); -}); - -it("should correctly handle default import from SystemJS external with default property", function() { - // ReactWithDefault should be the default property value - expect(ReactWithDefault).toBeDefined(); - expect(typeof ReactWithDefault).toBe("object"); - expect(ReactWithDefault.Component).toBeDefined(); - expect(ReactWithDefault.Fragment).toBeDefined(); - - // Named imports should still work - expect(typeof useEffectWithDefault).toBe("function"); - - // The default import should not be undefined - expect(ReactWithDefault).not.toBeUndefined(); -}); diff --git a/test/configCases/target/system-default-import-fix/webpack.config.js b/test/configCases/target/system-default-import-fix/webpack.config.js deleted file mode 100644 index 2e66a663c..000000000 --- a/test/configCases/target/system-default-import-fix/webpack.config.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -/** @type {import("../../../../").Configuration} */ -module.exports = { - output: { - libraryTarget: "system" - }, - externals: { - react: "react" - }, - node: { - __dirname: false, - __filename: false - } -};