Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure importing source files is possible #1331

Open
3 tasks
eltonmesquita opened this issue Jul 15, 2021 · 9 comments
Open
3 tasks

Make sure importing source files is possible #1331

eltonmesquita opened this issue Jul 15, 2021 · 9 comments

Comments

@eltonmesquita
Copy link
Collaborator

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.

@warengonzaga
Copy link
Member

How about starting with webpack @eltonmesquita?

@ramanjitsingh-hub
Copy link

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

@joeworkman
Copy link

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

@warengonzaga
Copy link
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.

@ramanjitsingh-hub
Copy link

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

@eltonmesquita
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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?

@debanjanbanerjee46
Copy link

I want to work on this issue

@Arif980
Copy link

Arif980 commented Apr 23, 2024

I want to work

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

No branches or pull requests

6 participants