Move some JS dependencies to peerDependencies
See original GitHub issueCurrently jQuery is listed as a package.json
dependency that causes npm
and webpack
to give Materialize its own private copy of jQuery (living in its node_modules
subdirectory). The result is that there are two separate jQuery versions in your project and Materialize’s jQuery plugins become unreachable.
Moving jquery
to peerDependencies
would solve the problem and would make Materialize share the single jQuery installation with the rest of the project it’s used in.
Hammer is listed as a package.json
dependency but it’s also bundled in compiled files in both dist
and bin
. For projects that wish to use Materialize as an npm
package this is quite wasteful and leads to code duplication.
Moving hammerjs
to peerDependencies
and either removing it from the compiled copy in dist
or (preferably) providing a commonjs
entry point to the original code in js
directory would solve this.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:9
- Comments:13 (4 by maintainers)
@Dogfalo it makes sense?
also @tomscholz the peerDependencies are not deprecated, the only deprecation was a change of the behavior of the package manager, that doesn’t install the packages in peerDependencies automatically.
Also, there’s: