animate.css icon indicating copy to clipboard operation
animate.css copied to clipboard

Make sure importing source files is possible

Open eltonmesquita opened this issue 4 years ago • 9 comments

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.

eltonmesquita avatar Jul 15 '21 11:07 eltonmesquita

How about starting with webpack @eltonmesquita?

warengonzaga avatar Sep 03 '21 03:09 warengonzaga

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

ramanjitsingh-hub avatar Sep 20 '21 10:09 ramanjitsingh-hub

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

joeworkman avatar Sep 20 '21 15:09 joeworkman

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.

warengonzaga avatar Sep 20 '21 16:09 warengonzaga

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

ramanjitsingh-hub avatar Sep 20 '21 16:09 ramanjitsingh-hub

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.

eltonmesquita avatar Sep 29 '21 11:09 eltonmesquita

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?

eltonmesquita avatar Jan 12 '22 11:01 eltonmesquita

I want to work on this issue

debanjanbanerjee46 avatar Jan 24 '23 06:01 debanjanbanerjee46