momocow / webpack-userscript

A Webpack plugin for userscript projects. 🙈
https://cow.moe/webpack-userscript/
MIT License
202 stars 21 forks source link

Failed to build if `updateBaseURL` is empty #82

Closed vitoyucepi closed 1 year ago

vitoyucepi commented 1 year ago

Summary

If the updateBaseURL option is undefined, then the build will fail.

@utils/webpack:     at new NodeError (node:internal/errors:399:5)
@utils/webpack:     at URL.onParseError (node:internal/url:565:9)
@utils/webpack:     at new URL (node:internal/url:645:5)
@utils/webpack:     at /tmp/test/node_modules/webpack-userscript/lib/features/resolve-base-urls.ts:36:17
@utils/webpack:     at _next0 (eval at create (/tmp/test/node_modules/tapable/lib/HookCodeFactory.js:75:10), <anonymous>:30:16)
@utils/webpack:     at eval (eval at create (/tmp/test/node_modules/tapable/lib/HookCodeFactory.js:75:10), <anonymous>:92:1)
@utils/webpack:     at processTicksAndRejections (node:internal/process/task_queues:95:5)

Version

Webpack: 5.75.0 Webpack-userscript: 3.0.0

Additional

https://github.com/momocow/webpack-userscript/blob/aa441fd4a6e1b304c423c30d905314b0f1ed5cb3/lib/features/resolve-base-urls.ts#L35-L39

momocow commented 1 year ago

Thanks for reporting the issue!

inazuma-bot commented 1 year ago

:tada: This issue has been resolved in version 3.0.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: