Closed AmirHossein closed 11 months ago
assetUrl uses env var but it would be great if we can pass it via config also. it required for asset cdn settings and css url() which is always relative. https://github.com/laravel/vite-plugin/blob/7abca675b82dd8a4fd23470f978110c3d083a0a1/src/index.ts#L132
assetUrl
Something like this:
const assetUrl = userConfig.assetUrl || (env.ASSET_URL ?? '');
and
export default defineConfig({ assetUrl : 'https://cdn.com/assets/', plugins: [ laravel({ input: [ // ... ], refresh: true, }), ], });
and finally get compiled css like this:
@font-face{ font-family:"FontName"; font-style:normal; font-weight:400; font-display:block; src:url('https://cdn.com/assets/fa-brands-400.731b74d3.eot'); /* ... */
assetUrl
uses env var but it would be great if we can pass it via config also. it required for asset cdn settings and css url() which is always relative. https://github.com/laravel/vite-plugin/blob/7abca675b82dd8a4fd23470f978110c3d083a0a1/src/index.ts#L132Something like this:
and
and finally get compiled css like this: