dojo / cli-build-widget

Command for building Dojo widgets
Other
6 stars 17 forks source link

Build-widget doesn't handle css from dependencies #90

Closed webdevisme closed 4 years ago

webdevisme commented 4 years ago

I'm having a headache trying to get functional widgets to build using the 'cli-build-widget' plugin/tool if I run 'dojo build widget' I get a css related compile error.

./node_modules/@dojo/widgets/theme/icon.m.css
Module build failed (from 
./node_modules/@dojo/cli-build-widget/node_modules/mini-css-extract-plugin/dist/
loader.js):
ModuleParseError: Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
    at handleParseError 
(/home/nathan/projects/user_interfaces/test/node_modules/webpack/lib/NormalModul
e.js:432:19)...

(the widget compiles normally and unit tests run fine) I've created a codesandbox, however I can't reproduce the error there https://codesandbox.io/s/wizardly-https-vxnql

webdevisme commented 4 years ago

I've managed to get the widgets to build, but then hit the same issue on the dependent app build. Thinking it was webpack build config related, I ejected the app, and the build works!?

Whilst this is good news (as I have a temporary solution to my immediate problem) I was hoping to be able to debug the issue by looking at the ejected configs.

Just to test the theory, I've reversed the eject command and the build issue returns.

Does anyone have any thoughts?

agubler commented 4 years ago

@webdevisme good to hear you have a work around for now! I am also surprised that it works.

We haven’t had the opportunity to investigate this yet, but it is something that we will pick up soon.

Thanks!