Comments (5)
v0.10.0
includes a change to use ESM import for fontawesome icons. Can you try that or latest version 0.10.2
to see if that fixes the above issue?
from generator-jhipster-svelte.
@littlepine, did you get chance to try out the latest version?
from generator-jhipster-svelte.
@vishal423 thank you very much for your response.
Let me test it later.
from generator-jhipster-svelte.
Oh, sorry, I just figure out the version I am using is already 0.10.2
Here I also attach my .yo-rc for reference
{
"generator-jhipster": {
"applicationIndex": 0,
"applicationType": "monolith",
"authenticationType": "oauth2",
"baseName": "vpair",
"blueprints": [
{
"name": "generator-jhipster-svelte",
"version": "0.10.2"
}
],
"buildTool": "gradle",
"cacheProvider": "ehcache",
"clientFramework": "svelte",
"clientPackageManager": "npm",
"clientTheme": "minty",
"clientThemeVariant": "primary",
"creationTimestamp": 1667237633479,
"databaseType": "sql",
"devDatabaseType": "mariadb",
"devServerPort": 9060,
"dtoSuffix": "DTO",
"enableGradleEnterprise": false,
"enableHibernateCache": true,
"enableSwaggerCodegen": false,
"enableTranslation": false,
"entities": [
"SystemSetting",
"MultiLangString",
"Address",
"Member",
"Company",
"PropertyPost",
"SearchedQuery",
"Membership"
],
"entitySuffix": "",
"gradleEnterpriseHost": "",
"jhiPrefix": "vpr",
"jhipsterVersion": "7.9.3",
"languages": ["en"],
"messageBroker": false,
"nativeLanguage": "zh-tw",
"otherModules": [
{
"name": "generator-jhipster-svelte",
"version": "0.10.2"
}
],
"packageFolder": "hk/com/justmove/platform/vpair",
"packageName": "hk.com.justmove.platform.vpair",
"pages": [],
"prodDatabaseType": "mariadb",
"reactive": false,
"searchEngine": "elasticsearch",
"serverPort": "8080",
"serviceDiscoveryType": false,
"skipCheckLengthOfIdentifier": false,
"skipClient": false,
"skipFakeData": false,
"skipServer": true,
"skipUserManagement": true,
"testFrameworks": ["cypress"],
"websocket": false,
"withAdminUi": true
},
"generator-jhipster-svelte": {
"swaggerUi": false,
"version": "0.10.2"
}
}
And acturally I have applied my own fix on that, which is not quite alegant through.
Here is what I did:
I installed the "svelte-fa" package to the jhipster-svelte-library
project.
Then replaced all the <Icon
tags to <Fa
and the icon problem fixed.
And I attach part of my patch here also for your reference:
diff --git a/node_modules/jhipster-svelte-library/input-control.svelte b/node_modules/jhipster-svelte-library/input-control.svelte
index 5652ee4..7d8beff 100644
--- a/node_modules/jhipster-svelte-library/input-control.svelte
+++ b/node_modules/jhipster-svelte-library/input-control.svelte
@@ -1,5 +1,6 @@
<script>
import { afterUpdate, createEventDispatcher } from 'svelte'
+ import Fa from 'svelte-fa'
import { faExclamationCircle } from '@fortawesome/free-solid-svg-icons/faExclamationCircle'
import { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes'
@@ -150,7 +151,7 @@
ref.dispatchEvent(new Event('change'))
}}"
>
- <Icon classes="mr-2" icon="{faTimes}" />
+ <Fa classes="mr-2" icon="{faTimes}" />
</Button>
{/if}
{:else}
@@ -182,7 +183,7 @@
<slot message="{message}" dirty="{dirty}" valid="{valid}">
{#if dirty && !valid}
<div data-testid="{name}-error" class="flex items-center">
- <Icon classes="mr-2" icon="{faExclamationCircle}" />
+ <Fa classes="mr-2" icon="{faExclamationCircle}" />
{message}
</div>
{:else} {/if}
If you don't mind, I can contribute on the fix.
Again, thank you very much for the effort on creating this blueprint and it helps me a lot on learning svelte.
from generator-jhipster-svelte.
@littlepine, it seems I missed the ESM change on the library side and hence the issue. Your help is much appreciated. I believe changing the import from import { faExclamationCircle } from '@fortawesome/free-solid-svg-icons/faExclamationCircle'
to import { faExclamationCircle } from '@fortawesome/free-solid-svg-icons'
should fix the issue.
While doing this, you can also combine multiple import statements like import { faExclamationCircle, faTimes } from '@fortawesome/free-solid-svg-icons'
.
Please note this change needs to be done across all references on library side https://github.com/vishal423/jhipster-svelte-library/search?q=from+%27%40fortawesome%2Ffree-solid-svg-icons%27
from generator-jhipster-svelte.
Related Issues (20)
- Generation fails with error: "Error: No parser could be inferred for file" HOT 1
- OAuth 2 login fail for gateway generated with "server only" HOT 2
- Explore integration of bootstrap/3rd party svelte components library
- Support SvelteKit 1.0 GA release HOT 3
- Enable lighthouse GitHub Actions job HOT 3
- Update cypress dependency and fix cypress related lint errors
- Svelte blueprint 1.0 release HOT 1
- Support Vitest as an alternative unit test framework HOT 2
- Support playwright as an alternative e2e test framework HOT 9
- Replace deprecated `eslint-plugin-svelte3` with `eslint-plugin-svelte` in generated applications
- No parser could be inferred HOT 5
- Support nodejs LTS v18 HOT 4
- Support JHipster v8 release HOT 16
- Explore support of the JHipster Quarkus blueprint
- Support release of JHipster `v8.7` release HOT 2
- Analyse and fix GitHub CI `microservices-oidc-maven-prod.jdl` failures
- Update third party dependencies HOT 1
- Analyze skipped lighthouse assertions
- Upgrade ESLint dependency
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generator-jhipster-svelte.