Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

webpack require.ensure issues #686

Closed
lvming6816077 opened this issue Dec 17, 2017 · 2 comments
Closed

webpack require.ensure issues #686

lvming6816077 opened this issue Dec 17, 2017 · 2 comments

Comments

@lvming6816077
Copy link
Contributor

lvming6816077 commented Dec 17, 2017

There are some component A,B,C and A.less,B.less,C.less,A belongs to entry a,B belongs to entry b.
A:
import C; import A.less
B:
import B.less; require.ensure([],function(require){ var C = require('C'); })
C:
import C.less

webpack.config.js:
plugins: [ new ExtractTextPlugin({ filename: '[name].css', allChunks: false }) ]

About entry a ,extract the C.less into a.min.css.
About entry b the C.less should not to be extracted because of the require.ensure.
The result is the C.less is missing in entry b because the C.less has been extracted by entry a.

@lvming6816077
Copy link
Contributor Author

I have made a pull request to fix this issue

@alexander-akait
Copy link
Member

@lvming6816077 Thanks for issue and PR!

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

No branches or pull requests

2 participants