mdbootstrap / material-design-for-bootstrap

Important! A new UI Kit version for Bootstrap 5 is available. Access the latest free version via the link below.
https://mdbootstrap.com/docs/standard/
MIT License
9.35k stars 1.15k forks source link

mdb 4.8.1 + webpack issues #236

Closed Dizzzlectic closed 4 years ago

Dizzzlectic commented 5 years ago

Expected behavior

Custom File Input doesnt work. Error printed into developer console.

Actual behavior

Custom File Input to work without errors being printed to console.

Your working environment and MDB version information

Latest git of MDB free + Webpack 4.31.0

Resources (screenshots, code snippets etc.)

Added a test environment with readme on github https://github.com/SpellCraft/mdb-webpack-test https://i.imgur.com/Gfld3tO.png

I can't see any other issues with MDB free for the moment

For every question of technical nature, in order to get the most detailed answer as soon as possible, ask on our dedicated Support Forum

pglejzer commented 5 years ago

Hi, we are very sorry about that bug, I thought we fix this but no.. You have to find in mdb.js ( or in picker-date.js) :

  // AMD.
  if (typeof define == 'function' && define.amd)
    define(['./picker', 'jquery'], factory)

and change it to :

  // AMD.
  if (typeof define == 'function' && define.amd)
    define(['picker', 'jquery'], factory)

https://ibb.co/N1CmCLF