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

Folder Structure Bundling #4006

Closed
grobo021 opened this issue Jan 15, 2020 · 13 comments
Closed

Folder Structure Bundling #4006

grobo021 opened this issue Jan 15, 2020 · 13 comments

Comments

@grobo021
Copy link

🙋 feature request

Could it be possible for parcel to bundle all the files according to the folder structure beginning from where are file is

🤔 Expected Behavior

Lets say we have the file structure below
| - Src -|
| | - Server.js (config file)
| | - Public - |
| | | - Index.html
| | | - Styles.css
Can it be loaded as the above in the dist

😯 Current Behavior

This is the file structre in dist
| - Server.js (config file)
| - Index.html
| - Styles.css

All files are in the root itself

💁 Possible Solution

Use fs-extra manipulation to load them as is

@DeMoorJasper
Copy link
Member

This will be possible in Parcel 2, thanks to the naming plugin. Parcel 1 has a flat file structure with hashes as this is the easiest to deploy to a cdn

@grobo021
Copy link
Author

Can I use parcel 2 as of now

@DeMoorJasper
Copy link
Member

@Gizmo-Rishab we're working very hard to get to a stable version asap, you can try it out

@grobo021
Copy link
Author

grobo021 commented Jan 17, 2020

How can I try it? 🤔

@DeMoorJasper
Copy link
Member

@Gizmo-Rishab follow the steps in the readme https://github.com/parcel-bundler/parcel#getting-started

@grobo021
Copy link
Author

grobo021 commented Jan 17, 2020

So I should run the commands below right @DeMoorJasper ?

$ npm uninstall parcel-bundler
$ npm install --save-dev parcel@next

@DeMoorJasper
Copy link
Member

Yes

@grobo021
Copy link
Author

grobo021 commented Jan 17, 2020

Is this normal, because not even npm audit fix --force can do much about it.
image

@DeMoorJasper
Copy link
Member

Probably npm audit doesn't really work properly

@grobo021
Copy link
Author

When I checked npm audit's logs, it showed a 196 error's of deprecated dependencies

@DeMoorJasper
Copy link
Member

DeMoorJasper commented Jan 17, 2020

I wouldn't worry about it, it reports a LOT of false positives. Most security issues according to npm aren't a security issue at all as they apply to a piece of code which is never even being ran or a dos vulnerability that makes no sense in the context it is used.

It's unfortunate because this will eventually cause people to ignore this and also ignore the real security issues it rarely reports.

@grobo021
Copy link
Author

Ok

@VincentVToscano
Copy link

Has this feature been rolled into 2.0.0-rc.0?

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

3 participants