Closed RudeySH closed 1 year ago
This is a bug.
The purpose of this behavior is to ensure the filename to be ended with .user.js
, not to prevent users from explicitly specifying the file extension.
I'll fix it soon.
Any update on this @momocow? I've had to roll back to 2.5.8 pending the fix here.
Any update on this @momocow? I've had to roll back to 2.5.8 pending the fix here.
Just set your output filename to use .js
instead of .user.js
for now:
output: {
clean: true,
path: OUTPUT,
// Can't use [name].user.js, see momocow/webpack-userscript#90
filename: '[name].js',
},
See my project webpack.conf.ts
.
The resulting asset is then given the .user.js
extension.
:tada: This issue has been resolved in version 3.2.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
After updating to webpack-userscript v3.0.0+, I get the following error when I run webpack:
This is my webpack.config.js:
Solution: I was able to fix the error by changing the filename to
'example.js'
, removing the ".user" part.This is a breaking change compared to v2.5.8.
I doubt causing a webpack error is intended, but I'm unsure if this needs to be fixed. The main reason I'm creating this issue is so others who run into this error, find the solution here.