Skip to content

Conversation

jleifeld
Copy link
Contributor

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

For Bugs and Features; did you add new tests?

I add tests to verify that multiple contentBasePublicPath's are working.

Motivation / Use-Case

I need multiple static directories with different paths. The problem there is that there is no global root path for the assets.

Breaking Changes

This PR is free of breaking changes and provide downwards compatibility.

Additional Info

@jsf-clabot
Copy link

jsf-clabot commented Mar 31, 2020

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Mar 31, 2020

Codecov Report

Merging #2489 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@ Coverage Diff @@ ## master #2489 +/- ## ========================================== + Coverage 93.53% 93.55% +0.02%  ========================================== Files 34 34 Lines 1314 1319 +5 Branches 375 379 +4 ========================================== + Hits 1229 1234 +5  Misses 83 83 Partials 2 2 
Impacted Files Coverage Δ
lib/Server.js 96.76% <100.00%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f317358...288aac0. Read the comment docs.

@alexander-akait
Copy link
Member

I need multiple static directories with different paths. The problem there is that there is no global root path for the assets.

Can you provide real use case?

@jleifeld
Copy link
Contributor Author

When you have several micro applications which all have custom static folders:

Application 1: /application-one/static/
Application 2: /application-two/static/
Application 3: /application-three/static/

@alexander-akait
Copy link
Member

@jleifeld just for information - you have one big app with own content static and multiple micro apps which used in on big app with own statics?

@jleifeld
Copy link
Contributor Author

jleifeld commented Apr 1, 2020

Yes, that is the case. The main application is extendable with plugins. These plugins have all their own static folder. In our case we have these static folders:

for the main application: '/administration/static', for the plugins: '/pluginName/static' 

This allows each plugin to have a scoped folder which does not get in conflict with other files from other plugins

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hiroppy
Copy link
Member

hiroppy commented Apr 1, 2020

I'll change the CI code of lint asap.

@hiroppy
Copy link
Member

hiroppy commented Apr 1, 2020

Need to update documentation.
https://github.com/webpack/webpack.js.org

@snitin315
Copy link
Member

Need to update documentation.
https://github.com/webpack/webpack.js.org

I will do it if you agree.

@jleifeld
Copy link
Contributor Author

jleifeld commented Apr 1, 2020

@snitin315 Of course 👍

@alexander-akait
Copy link
Member

@hiroppy Feel free to merge after CI green

@hiroppy hiroppy merged commit c6bdfe4 into webpack:master Apr 2, 2020
@hiroppy
Copy link
Member

hiroppy commented Apr 2, 2020

Thanks

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

Labels

None yet

5 participants