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

Don't log outputPath #64

Open
stevenvachon opened this issue Oct 25, 2018 · 2 comments
Open

Don't log outputPath #64

stevenvachon opened this issue Oct 25, 2018 · 2 comments

Comments

@stevenvachon
Copy link

It's not consistent with the rest of the webpack log:

                      Asset      Size          Chunks             Chunk Names
/project/build/legacyApp.js  4.11 MiB                  [emitted]  
                  ccApp.css  26.3 KiB           ccApp  [emitted]  ccApp
                   ccApp.js   117 KiB           ccApp  [emitted]  ccApp
         ccDesignSystem.css  60.6 KiB  ccDesignSystem  [emitted]  ccDesignSystem
          ccDesignSystem.js  1.63 MiB  ccDesignSystem  [emitted]  ccDesignSystem
                 ccUser.css    27 KiB          ccUser  [emitted]  ccUser
                  ccUser.js  50.1 KiB          ccUser  [emitted]  ccUser
                 common.css   678 KiB          common  [emitted]  common
                  common.js  11.7 MiB          common  [emitted]  common
@stevenvachon
Copy link
Author

Actually, this was caused because outputPath was doubled up somehow due to it having the same value as webpack's output.path. Is this a bug, or expected behaviour?

@scriptin
Copy link

@stevenvachon Had the same problem.

The solution is:

  1. Specify output.path in Webpack's config
  2. Don't specify outputPath in this plugin's config

The path you put in outputPath of this plugin is relative to Webpack's output.path (they are probably combined via path.resolve()). This means that if you put the same path in both output.path and outputPath you will have those "doubled up" paths. I believe this is intended, but the docs of this plugin don't describe this behavior.

This is also why you see your outputPath in logs, because in your configuration their parent directories are not the same as Webpack's output.path. If you remove this setting (the 2nd step above), you'll see what you expect.

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