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

🐛 Minor fixes #111

Merged
merged 4 commits into from
Dec 23, 2024
Merged
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,19 +249,19 @@ To avoid caching and make the main script always be updated after each page refr

To enable the proxy script, provide a `proxyScript` configuration to the plugin constructor.

`baseUrl` should be the base URL of the dev server, and the `filename` is for the proxy script.
`baseURL` should be the base URL of the dev server, and the `filename` is for the proxy script.

> Note: `filename` will be interpolated.

After starting the dev server, you can find your proxy script under `<baseUrl>/<filename>`. In the example below, assume the entry filename is `index.js`, you should visit `http://127.0.0.1:12345/index.proxy.user.js` to install the proxy script on TamperMonkey.
After starting the dev server, you can find your proxy script under `<baseURL>/<filename>`. In the example below, assume the entry filename is `index.js`, you should visit `http://127.0.0.1:12345/index.proxy.user.js` to install the proxy script on TamperMonkey.

See [Issue#63](https://github.com/momocow/webpack-userscript/issues/63) for more information.

```js
new WebpackUserscript({
// <...your other configs...>,
proxyScript: {
baseUrl: 'http://127.0.0.1:12345',
baseURL: 'http://127.0.0.1:12345',
filename: '[basename].proxy.user.js',
},
});
Expand Down
2 changes: 1 addition & 1 deletion lib/features/interpolater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class Interpolater extends Feature {
buildTime,
}: WaterfallContext): Record<string, string> {
return {
name: chunk.name,
name: chunk.name ?? '',
file: originalFile,
filename,
basename,
Expand Down
Loading
Loading