for maintaining purpose, I have merged several entries into one single entry, and I am using require.ensure([], function(require) {}) to include my js and css file on demand, which looks like:
then on both of page A and page B, I require the common.js and common.css
now, when I visit page A, it alerts "its page A" as expect, and "its page B" alerts on page B as well,
everything is perfectly fine, HOWEVER, on both page A and page B, the body's background turns to #000, it seems "require.ensure" only works on separating JS file whereas there is no way to separate two css files. Is that correct? any suggestions?
for maintaining purpose, I have merged several entries into one single entry, and I am using
require.ensure([], function(require) {})
to include my js and css file on demand, which looks like:then on both of page A and page B, I require the common.js and common.css
now, when I visit page A, it alerts "its page A" as expect, and "its page B" alerts on page B as well, everything is perfectly fine, HOWEVER, on both page A and page B, the body's background turns to #000, it seems "require.ensure" only works on separating JS file whereas there is no way to separate two css files. Is that correct? any suggestions?