Closed imamatory closed 4 years ago
Hi @imamatory. I am not sure if I understand your question.
--public-url
flag specifies how assets are referenced (served).
If it is /
than your dist
folder is treated as a base point.
On the other hand, if it is ./
, then it's a relative path to the asset.
Which public-url did you specify?
We'll resolve this, don't worry. Just describe to me what your goal is (i.e. what were you trying to accomplish)?
Thank you :)
I am trying to specify static url prefix because it vary in different environments. In my case it is /static/
. The problem is that i build django templates rather than static html that may be served via relative paths. So i need to specify absolute urls in html templates
I think I got it now, instead of typical /
or ./
you would like a custom public-url.
As of now, this is not possible. I'll start working on this as soon as I resolve the bug on Windows.
Thank you for your patience and understanding.
That's great! Will wait.
On Wed, May 6, 2020, 3:03 AM Vladimir Mikulic notifications@github.com wrote:
I think I got it now, instead of typical / or ./ you would like a custom public-url. As of now, this is not possible. I'll start working on this as soon as I resolve the bug on Windows.
Thank you for your patience and understanding.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/VladimirMikulic/parcel-plugin-custom-dist-structure/issues/19#issuecomment-624368900, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIAURCCSYXGT5VI4X4DG7LRQCSMLANCNFSM4MZ7NUPA .
Hi @jedchang. I think I've fixed it, but I'll need your help to verify this :)
I would like you to test it, the steps are:
git clone https://github.com/VladimirMikulic/parcel-plugin-custom-dist-structure.git
git checkout feature/custom-absolute-public-url
npm i
npm link
Thank you.
Yeah! It works awesome!
@imamatory that's good to hear! I've published a new version v1.1.10 which includes this change.
Also, thank you for mentioning npm i
. I should've specified it :)
Enjoy :rocket:
I've used yarn so i decided that with linking via npm npm i
may not be necessary.
Thank you! You've kept me with parcel :+1:
No problem. I am a big fan of Parcel and zero-config approach. Webpack is a necessity for bigger projects, but for side projects and even sm-mid size production apps Parcel serves just fine! Glad you like it :)
Hi. This is awesome plugin i really like it but i found it a bit strange that
--public-url
parcel param doesn't appear in resulting url. I looked at the plugin code and realised that this behavior is intentional. So the question is how can i put public url in dependencieshref
orsrc
? Should it be treated as a bug?my config in package.json