seek-oss / playroom

Design with JSX, powered by your own component library.
MIT License
4.45k stars 183 forks source link

v0.28.x #281

Closed RaimondJuhansonTelia closed 1 month ago

RaimondJuhansonTelia commented 1 year ago

After updating playroom to 0.28.x I'm getting this error when starting playroom:

Compiled with problems:
ERROR in ./playroom/Frame.tsx 13:0-29
Module not found: Error: Can’t resolve ‘style-loader’ in ‘{project/url}’

After installing style-loader I'm getting this error:

Uncaught TypeError: Cannot read properties of undefined (reading 'toolbarItemSize')
    at eval (Playroom.tsx?f940:40:36)
    at ../../node_modules/playroom/src/Playroom/Playroom.tsx (vendors-node_modules_playroom_src_index_js.960c1970fbae9667cef1.js:2524:1)
    at __webpack_require__ (runtime.e84c3a89277329f6054e.js:36:33)
    at fn (runtime.e84c3a89277329f6054e.js:323:21)
    at eval (index.js:5:76)
    at ../../node_modules/playroom/src/index.js (vendors-node_modules_playroom_src_index_js.960c1970fbae9667cef1.js:2897:1)
    at __webpack_require__ (runtime.e84c3a89277329f6054e.js:36:33)
    at __webpack_exec__ (index.e5c7f3f809f96ffd710d.js:31:48)
    at index.e5c7f3f809f96ffd710d.js:32:603
    at __webpack_require__.O (runtime.e84c3a89277329f6054e.js:88:23)

Any ideas what's causing this issue?

michaeltaranto commented 1 year ago

Hey, just having a quick look at what changed in that release. We removed style-loader as we changed our internal styling solution, so maybe your app was implicitly depending on our dependency.

Looks like your config is trying to apply your styling rules to our CSS modules.

I would suggest that you do two things:

  1. Add style-loader
  2. Add an include rule to your webpack styled by config to target only your app files (or exclude node_modules if not needed)
askoufis commented 1 month ago

Closing due to inactivity. Please feel free to re-open with a minimal reproduction if this is still an issue.