Skip to content

Make sure importing source files is possible #1331

Open

Description

@eltonmesquita

We should make sure that it's possible to import individual source files directly from the node_modules so developers won't need to resort to custom builds which are very annoying to maintain and not very practical these days.

I think we should check/add support for at least:

  • Webpack
  • Rollup
  • Parcel

Have a look at #1307 for more context.

Activity

  1. warengonzaga commented on Sep 3, 2021

    @warengonzaga
    Member

    How about starting with webpack @eltonmesquita?

  2. ramanjitsingh-hub commented on Sep 20, 2021

    @ramanjitsingh-hub

    I am a newbie can you verify that this problem can be solved using this link https://webpack.js.org/guides/getting-started/
    I have time to combine a pr please go through this as I definitely need guidance

  3. joeworkman commented on Sep 20, 2021

    @joeworkman

    Have a look at esbuild as well... https://esbuild.github.io

  4. warengonzaga commented on Sep 20, 2021

    @warengonzaga
    Member

    Have a look at esbuild as well... https://esbuild.github.io

    This is promising I need to check this out first. Thanks for sharing @joeworkman.

  5. ramanjitsingh-hub commented on Sep 20, 2021

    @ramanjitsingh-hub

    I can combine a pr if someone can guide me through it

  6. eltonmesquita commented on Sep 29, 2021

    @eltonmesquita
    CollaboratorAuthor

    This might not need a PR. The main task is to verify if it's possible today and if any change is required on our side, then putting a PR together with the fix will be the way to go.

    Just a reminder that it already works when importing the main files in the root of the project, we just need to be sure that importing the source files, in the source directory, work properly in these main bundlers.

  7. eltonmesquita commented on Jan 12, 2022

    @eltonmesquita
    CollaboratorAuthor

    I've tried it out with webpack and css-loader and it worked just fine. It's just a bit weird to use as you have to point to the whole path for the file for it to work. Like this:

    import "animate.css/source/attention_seekers/bounce.css";
    import "animate.css/source/animate.css";

    It's not very practical. I'm not sure if we can provide a better way to use it without using some js, which I'm open to. Maybe an index.js file exporting all the CSS files could work?

  8. debanjanbanerjee46 commented on Jan 24, 2023

    @debanjanbanerjee46

    I want to work on this issue

  9. Arif980 commented on Apr 23, 2024

    @Arif980

    I want to work

  10. aparajitaks commented on Nov 29, 2025

    @aparajitaks

    Hi! 👋 I’d like to help with this issue.

    I’ll start by reviewing how Animate.css currently exposes its files in the package and check what prevents direct source imports (e.g., Webpack/Rollup/Parcel not being able to resolve the individual animation files from node_modules).

    My plan:
    • Inspect how other CSS libraries expose their sources (like Tailwind or Bootstrap)
    • Test importing individual animations using Webpack, Rollup, and Parcel
    • Propose changes to the package structure or build config to support modular imports cleanly

    I’ll share initial findings soon. If there are specific tools or bundlers the team prefers I test first, please let me know!

  11. RudraKo commented on Nov 29, 2025

    @RudraKo

    Hi! I’d like to take this issue.

    I’ll investigate how Animate.css exports its files and explore the necessary changes to allow importing individual animations directly (for Webpack, Rollup, and Parcel). I’ll share a proposal once I confirm a working approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions