Closed ferllings closed 11 months ago
Put it in Vite's public directory.
Yes, but I can not longer keep the record in the manifest: The file is in /public/lib/leader-line.min.js,
✓ 0 modules transformed.
Could not resolve entry module "src/lib/leader-line.min.js".
✓ 0 modules transformed.
[web-extension:manifest] Could not resolve entry module "src/lib/leader-line.min.js".
Nevermind, I believe I found my mistake: It's working now
"js": [
"public/lib/leader-line.min.js"
],
Looks like I spook too soon:
I put my lib into src/public/leader-line.min.js
Then in manifest
"js": [
"public/leader-line.min.js"
],
Vite put a unmodified copy on "dist/leader-line.min.js" and second but modified copy on "dist/public/leader-line.min.js"
If switch manifest.json, in order to use the "dist/leader-line.min.js" unmodified copy
"js": [
"leader-line.min.js"
],
It throws Could not resolve entry module "src/leader-line.min.js"
@ferllings I've added a new feature to address this, could you try it out?
Install version 4.1.0-alpha1
(the @next
tag on NPM), and add the "public:"
prefix to your content script path.
"js": [
"public:leader-line.min.js"
],
Make sure the file is in public/leader-line.min.js
, and it should work for your.
I'm afraid it still not working: Could not resolve entry module "public:leader-line.min.js"
I modified the manifest file:
The installed node_module version is correct:
Interesting. Could you upload a zip of a minimal reproduction? The above was working for me in my test case.
Here you go test-repo.zip
Thanks. I confirm it is working.
Hello, More a question than a bug.
I have some 3rd party libs, already minified, that I would like to include in my manifest:
How can include it, without processing/building it?
Thanks