Git Product home page Git Product logo

Comments (5)

cyberalien avatar cyberalien commented on May 30, 2024 1

Yes, you are correct. It is bundled during development and module is not accessed in production (it is accessed as part of bundle, not as external file from node_modules), therefore it is a dev dependency.

from iconify.

cyberalien avatar cyberalien commented on May 30, 2024

Which package are you referring to? SVG framework or one of components?

For most components and for SVG framework you should bundle it, so production file has only one script file to include in web page. It is bundled during development, so it is a dependency only during development. In production it is included in the bundle and bundle does not depend on package anymore.

from iconify.

cyberalien avatar cyberalien commented on May 30, 2024

Also, for SVG framework you can avoid bundling it and use it as dependency, but then you will need to link to SVG framework script in page. It would be a bad idea to link to file inside node_modules in a public document.

Therefore SVG framework script is better to be either included from external website (such as link to code.iconify.design) or copied somewhere. If it is linked as external script and used in bundle as external variable, it is no longer a local dependency and used only during development. If it is copied somewhere, it is done during development, so it is also only a dev dependency.

from iconify.

garytalmes avatar garytalmes commented on May 30, 2024

Hi - I'm referring to the Iconify For React package, as referenced here: https://github.com/iconify/iconify/tree/master/packages/react

Oh, I see what you mean -- during the build process all the resources are bundled then, is that correct? (Sorry, I didn't know that the build process also assembled fonts/svg in this way).

from iconify.

garytalmes avatar garytalmes commented on May 30, 2024

Thanks very much!

from iconify.

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.