Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: webpack referencing __filename
  • Loading branch information
privatenumber committed Aug 24, 2021
commit 174b904d92f58f5c84b7fdb05e5cfaf89f5ce618
4 changes: 3 additions & 1 deletion src/server/bundle-renderer/create-bundle-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ function compileModule (files, basedir, runInNewContext) {
return require(file)
}
}
compiledWrapper.call(m.exports, m.exports, r, m)

const _filename = '/' + filename;
compiledWrapper.call(m.exports, m.exports, r, m, _filename, path.dirname(_filename));

const res = Object.prototype.hasOwnProperty.call(m.exports, 'default')
? m.exports.default
Expand Down