You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scenario: You have a SPA, say a VueJS one built with Vite. This app is to be deployed on a public path, say myapp so it'd be www.example.com/myapp/.
When the SPA bundle is built, its assets links are of the format /myapp/assets/main.css, but in the dist directory, the build is just dist/assets/main.css
It doesn't appear to be possible to get the extract option of inline-critical to function. https://github.com/bezoerb/inline-critical/blob/main/index.js#L165 is resolve(join(o.basePath || process.cwd, href)); which, with a basePath of "./dist" resolves to /directory/dist/myapp/assets/main.css which is incorrect.
It would be great if we could specify a publicPath option that lets inline-critical know that there's a public path parameter that it should ignore/remove when trying to locate the CSS file.
The text was updated successfully, but these errors were encountered:
Hey @steveworkman, thanks for creating this issue :)
Unfortunately i don't have much time at the moment but i will try to take a look at this as soon as i have some free minutes.
Scenario: You have a SPA, say a VueJS one built with Vite. This app is to be deployed on a public path, say
myapp
so it'd be www.example.com/myapp/.When the SPA bundle is built, its assets links are of the format
/myapp/assets/main.css
, but in the dist directory, the build is justdist/assets/main.css
It doesn't appear to be possible to get the extract option of inline-critical to function. https://github.com/bezoerb/inline-critical/blob/main/index.js#L165 is
resolve(join(o.basePath || process.cwd, href));
which, with a basePath of"./dist"
resolves to/directory/dist/myapp/assets/main.css
which is incorrect.It would be great if we could specify a
publicPath
option that lets inline-critical know that there's a public path parameter that it should ignore/remove when trying to locate the CSS file.The text was updated successfully, but these errors were encountered: