Code Monkey home page Code Monkey logo

Comments (5)

pimlie avatar pimlie commented on June 1, 2024 1

@seandan7 Maybe a webpack alias could work?

from fontawesome-module.

seandan7 avatar seandan7 commented on June 1, 2024

@pimlie That worked swimmingly!

from fontawesome-module.

vakrolme avatar vakrolme commented on June 1, 2024

@seandan7, could you please share your config for how you did it?

from fontawesome-module.

seandan7 avatar seandan7 commented on June 1, 2024

@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.

vakrolme avatar vakrolme commented on June 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.