-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Full webpack5 support. (#157)
* Add webpack5 support. Fixes #156 * Add webpack5 test fixtures. Fixes #140 * Test: Refactor test fixture base `webpack.config.js`. * Test: Change handling of tree-shaking supported fixtures to compare production on v4+ and dev vs prod on v3-. * Test: Remove `expose-loader` from `loaders` test scenario as just wasn't working on windows + v5. * Test: Refactor and rename various internal test utilities.
- Loading branch information
1 parent
4b8809a
commit b75d9f2
Showing
16 changed files
with
386 additions
and
170 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,15 @@ | ||
|
||
/* eslint-disable no-console */ | ||
/* globals global */ | ||
|
||
import text from "./hello.txt"; | ||
import style from "./style.css"; | ||
|
||
// Use expose loader to make global | ||
require("expose-loader?BunBun!./bunny"); // eslint-disable-line import/no-unresolved | ||
// Legacy: just require a file (gave up on `expose-loader` global in webpack5 | ||
// upgrade). | ||
require("./bunny"); | ||
|
||
const hello = () => "hello world"; | ||
|
||
console.log("hello", hello()); | ||
console.log("text", text); | ||
console.log("style", style.toString()); | ||
|
||
let root = typeof window !== "undefined" && window; | ||
if (!root && typeof global !== "undefined") { | ||
root = global; | ||
} | ||
|
||
console.log("global", root.BunBun); |
Oops, something went wrong.