-
Notifications
You must be signed in to change notification settings - Fork 8
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
Allow customizing the fontFace URL for production environment through cssFontsUrl. #4
base: main
Are you sure you want to change the base?
Conversation
this.emitFile({ type: 'asset', fileName: `assets/${processedOptions.fontName}-${guid()}.${type}`, source: generatedFonts?.[type] }), | ||
).replace('assets', cssFontsUrl)}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would this work also?
this.emitFile({ type: 'asset', fileName: `assets/${processedOptions.fontName}-${guid()}.${type}`, source: generatedFonts?.[type] }), | |
).replace('assets', cssFontsUrl)}`, | |
this.emitFile({ type: 'asset', fileName: `${cssFontsUrl}/${processedOptions.fontName}-${guid()}.${type}`, source: generatedFonts?.[type] }), | |
)`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried, but unfortunately, it appears to be unsuccessful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this mean we emit the file to 1 location (assets
), and then import it from another location (cssFontsUrl
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, indeed. It may be because I specified rollupOptions.build.out
, so the emitted files will be placed in the assets
folder under the out directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this work when not setting that setting as you have?
Would you be willing to fix this if not?
Allow customizing the Css fontFace URL for production environment through options.cssFontsUrl.