material-design-for-bootstrap icon indicating copy to clipboard operation
material-design-for-bootstrap copied to clipboard

Not compatible with webpack4 and ES6 modules

Open yoones opened this issue 6 years ago • 1 comments

When I require mdbootstrap in a webpacker pack (Rails 6 application), the following error is outputed:

  • Firefox: TypeError: "exports" is read-only
  • Chrome: Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'

Is there a way or a plan to make mdbootstrap compatible with webpack4 and ES6 modules?

Links:

  • Github demo app: https://github.com/yoones/rails_6_mdb_through_webpacker
  • Yarn package.json: https://github.com/yoones/rails_6_mdb_through_webpacker/blob/master/package.json
  • Webpacker env config: https://github.com/yoones/rails_6_mdb_through_webpacker/blob/master/config/webpack/environment.js
  • Webpacker pack: https://github.com/yoones/rails_6_mdb_through_webpacker/blob/master/app/javascript/packs/application.js

Versions:

  • Ruby on Rails 6.0.1
  • Webpacker 4.2.2
  • mdbootstrap 4.10.1

yoones avatar Dec 10 '19 08:12 yoones

Hi. We're working to resolve this issue. Another thread already exists on our support issue-with-4-9-0-webpack-typescript

gbujanski avatar Dec 10 '19 09:12 gbujanski