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
Absolute path for worker.js #23
Comments
At first glance I cannot explain why the worker goes in publicPath. |
feel free to reopen if the issue still persists |
The issue still persists for me, but I've worked it around by changing my public path from |
The pdf worker is processed by worker-loader whose default output is |
Same issue here, I'm using vue-cli Webpack, how did you fix it? I tried your solution @tsauvajon but it didn't work ! I apreciate your help! |
@rodrigorodriguescosta My problem was that it tried to get my worker at I've changed my webpack configuration (with the vue webpack template, it is located in |
Thank you, it worked here without change |
I have the same issue I tried all solutions ,but not worked,I want to package the work.js file in static/js,have you any idea?thanks a lot. @FranckFreiburger |
edit webpack.config.js
|
@tsauvajon Thanks for your workaround. I am having the same problem. But we host scripts in different domain (CDN server). So changing path to relative wont work. Any other way to fix this? |
then try to hack this line: Line 13 in fb274cb
|
Caused by #144 |
I fixed it like this |
I have the same issue, after 1day investigate I fix as: |
@FranckFreiburger How can we hack the import line, Couldn't understand it. I am also facing the same cross origin issue. |
This is what I did to make it work from my end. My issue was that I didn't want the worker.js file that was created to end up in the public folder, instead in public/js and as @fdlk mentioned, that wont work by trying to explicitly set the path. FYI. My setup is Laravel with Vue, so hoping to help those with that set up.
|
While the pdf viewer works well in local, I have an issue when building my application and serving it over IIS via an Asp.Net application. For some reason it tries to retrieve worker.js as an absolute path (
/
) while it should be relative : it tries to retrievehttp://server-name/hash.worker.js
instead ofhttp://server-name/application-name/hash.worker.js
Note : when building I get this structure :
It seems like
worker.js
is almost equivalent to0.js
(almost the same size for the.js
,.js.gz
and.js.map
, just slighly lighter for the0.js
files). But including it won't change anything, it still doesn't work.EDIT : I guess this is a webpack issue, but I don't understand why it is served under the "publicPath" repository and not the usual directory used by everything else. The actual question is : Why is worker.js generated under the public path rather than the dist path ? And why is it not integrated in the vendor.js bundle ?
The text was updated successfully, but these errors were encountered: