dojo / cli-build-webpack

🚀 **DEPRECATED** Dojo 2 - cli command for building applications
http://dojo.io
Other
4 stars 19 forks source link

Dojo Build fails when using `composes` with local files #166

Closed tomdye closed 7 years ago

tomdye commented 7 years ago

Bug

When attempting to use composes with a local .css file import the cli build command will currently fail. This appears to be because the css-module composes functionality adds require statements to the generated webpack output that we did not account for in our css-module-decorator-loader when adding our theme key.

We need to re-visit this to allow for the extra requires and cannot assume the provided format is JSON as before.

The output in fact, can look like this:

 "root": "_3kYHOfq9 " + require("-!../../../node_modules/css-loader/index.js?modules&sourceMap&importLoaders=1&localIdentName=[hash:base64:8]!../../../node_modules/postcss-loader/index.js?{\"plugins\":[null,{\"version\":\"5.2.17\",\"plugins\":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null],\"postcssPlugin\":\"postcss-cssnext\",\"postcssVersion\":\"5.2.17\"}]}!./base.css").locals["bob"] + "",
        "text": "_3WTyNu_u"