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

Base project prod build packs up entire project folder #144

Open
capttrousers opened this issue Aug 3, 2017 · 3 comments
Open

Base project prod build packs up entire project folder #144

capttrousers opened this issue Aug 3, 2017 · 3 comments

Comments

@capttrousers
Copy link

Scaffold the base project:

$ vue init egoist/vuepack test && cd test
$ npm install && npm run dev

Open the Sources tab in Chrome, and the entire client folder with the full path is shown. I'd expect it to obfuscate that or something, is that expected behavior?

@egoist
Copy link
Owner

egoist commented Aug 3, 2017

that's the expected behavior, why do you want to obfuscate that?

@capttrousers
Copy link
Author

There's three aspects I'm thinking of:

  • The full file path is listed in the Sources tab, which just seems weird to me. Shouldnt the webpacking just grab the stuff within that project, but not care what the file path name is? Why would that be preserved anywhere, if the project is just being sent to the /dist folder as static files?
  • The un-uglified/minified components and the directory structure of the client folder is shown, so someone could basically recreate the project easily.
  • Even in the client bundle that is minified, the variable names and everything are kept normal.

I am just getting started with webpack and such, but I was under the impression that "uglify" the js meant variable names are replaced with random values, so MySpecialVariable gets turned into acufq everywhere or something like that. Is there ways to accomplish some of this obfuscation with webpack settings?

@capttrousers
Copy link
Author

I understand that the entire client directory will end up being sent to the client's browser but I guess I'm confused as to the level of obfuscation possible.

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

No branches or pull requests

2 participants