Comments (5)
@seandan7 Maybe a webpack alias could work?
from fontawesome-module.
@pimlie That worked swimmingly!
from fontawesome-module.
@seandan7, could you please share your config for how you did it?
from fontawesome-module.
@vakrolme I don't work where I used this code anymore. I should have commented it here.
I believe it was something like this:
nuxt.config.js
module.exports = {
build: {
extend (config) {
config.resolve.alias['@fontawesome']= path.join(this.options.srcDir, 'fontawesome-local')
}
}
}
With all of your local downloaded files in that directory.
from fontawesome-module.
Thanks @seandan7. I used nuxt's own alias property instead:
import { resolve } from 'path';
export default {
...
alias: {
'@fortawesome/free-regular-svg-icons': resolve(__dirname, 'assets/icons/fontawesome-local/free-regular-svg-icons'),
},
...
}
It's also important not to confuse which type of distribution you should put there, it should be js-packages, not js, so the directory you point to must feature index.js and a separate file for each icon, rather than all.js. That's why nothing worked for me until I figured it out.
from fontawesome-module.
Related Issues (20)
- Typescript support HOT 2
- Fontawesome icons not being loaded from pro folder
- Missing dependency declarations
- [Vue warn]: Unknown custom element: XXX did you register the component correctly? For recursive components, make sure to provide the "name" option. HOT 3
- jest mock HOT 1
- Cannot read property 'prefix' of undefined HOT 3
- Storybook support not available in the latest NPM release
- How to use these icons in buefy components? HOT 1
- Module not working HOT 5
- Not require listing all icons on nuxt.config.js HOT 1
- FontAwesome 6 Support HOT 7
- Brand icons are not loading HOT 2
- Dependency Dashboard
- Does this still function? Cannot find icons HOT 1
- Icons are not working in production after installing tailwind v3
- Brand icons not loading in production build
- Regular free icon not showing in production build HOT 1
- Nuxt 3 compatibility? HOT 1
- Got issue when npm run build `ERROR Cannot read properties of undefined (reading 'fontawesome') `
- how do i add a custom kit using imports?
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 fontawesome-module.