Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed an issue with alias being settled rudely #1125

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Changelog

_Note: Gaps between patch versions are faulty, broken or test releases._

## v4.0.0-beta.?? (2024-??-??)

* Fixed an issue with aliases being set for build in ssr `build/webpack/resolve/alias`

## v4.0.0-beta.56 (2024-02-09)

#### :rocket: New Feature
Expand Down
18 changes: 11 additions & 7 deletions build/webpack/resolve/alias.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ const
const aliases = {
'@super': resolve.rootDependencies[0],

// This is required for using jest-mock,
// otherwise jest-mock pulls various Node.js modules into the browser environment.
'graceful-fs': false,
path: false,
picomatch: false,
url: false,

...$C(pzlr.dependencies).to({}).reduce((map, el, i) => {
const
asset = resolve.depMap[el].config.assets;
Expand All @@ -52,4 +45,15 @@ if (pzlr.assets?.['sprite'] != null) {
aliases.sprite = src.assets(pzlr.assets.sprite);
}

if (!webpack.ssr) {
Object.assign(aliases, {
// This is required for using jest-mock,
// otherwise jest-mock pulls various Node.js modules into the browser environment.
'graceful-fs': false,
path: false,
picomatch: false,
url: false
});
}

module.exports = aliases;
Loading