Describe the bug
I'm trying to build svelte components lib with Svelte kit. I want to self host my fonts, so I have added them in my custom component "Theme" which exports my global styles and fonts.
Folder structure is:
Theme/
Theme.svelte
fonts/webfonts/custom_font.woff2
fonts/webfonts/custom_font.ttf
css/ fonts.css
- When I run the project with "npm run dev" , it is working in my demo page in routes/ index.svelte.
- When I run "npm run package", svelte generates folder "package" and there is my component and the fonts folder with its content, but the .woff2 file and .ttf are broken. When I create a new project and add the package to it, there is an error in the browser "Failed to decode downloaded font:". After I've replaced the generated .woff2 and .ttf files after "npm run package" with those that are in my lib folder, it works as expected.
Is there a way to tell Svelte kit to not processing or modifying the files in folder or in general to skip file types in project but add them to package after run the command.
I'm sure that there is way to achieve this and I'll be very thankful If someone helps me
Reproduction
<script>
console.log('Theme initialized');
</script>
<div class="theme">
<slot />
</div>
<style global lang="scss">
// Adding global styles
@import '../../styles/root';
@import '../../styles/utilities';
@import '../../styles/base';
@import './fonts/css/fonts.css';
</style>
Logs
No response
System Info
System:
OS: macOS Mojave 10.14.5
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Memory: 2.55 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.15.5 - ~/.nvm/versions/node/v14.15.5/bin/node
npm: 6.14.11 - ~/.nvm/versions/node/v14.15.5/bin/npm
Severity
annoyance
Additional Information
No response
Describe the bug
I'm trying to build svelte components lib with Svelte kit. I want to self host my fonts, so I have added them in my custom component "Theme" which exports my global styles and fonts.
Folder structure is:
Is there a way to tell Svelte kit to not processing or modifying the files in folder or in general to skip file types in project but add them to package after run the command.
I'm sure that there is way to achieve this and I'll be very thankful If someone helps me
Reproduction
Logs
No response
System Info
System: OS: macOS Mojave 10.14.5 CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz Memory: 2.55 GB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 14.15.5 - ~/.nvm/versions/node/v14.15.5/bin/node npm: 6.14.11 - ~/.nvm/versions/node/v14.15.5/bin/npmSeverity
annoyance
Additional Information
No response