webpack integration
See original GitHub issuethere is a bug in materialize when working with webpack. when I add materialize this way
import 'jquery';
import 'materialize-css';
I get this exception on Horizontal FAB from the button components (http://materializecss.com/buttons.html#floating)
Uncaught TypeError: $this.find(...).velocity is not a function
but when I add the script the normal way
<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.5/js/materialize.min.js"></script>
it works, so the problem is when I bundle materialize.js, some functions stop to work. what can I do to fix it?
Issue Analytics
- State:
- Created 8 years ago
- Comments:8
Top Results From Across the Web
Integrations | webpack
This guide provides a high-level overview of how webpack can be integrated into some of the more popular task runners. NPM Scripts. Often...
Read more >Using with webpack - Jest
Jest can be used in projects that use webpack to manage assets, ... over other tools because it integrates directly with your application...
Read more >Integration with Webpack - Flexmonster
Integration with Webpack · Step 1. Create a new project based on the sample from GitHub · Step 2. Install npm packages ·...
Read more >Webpack Integration - CKEditor 4 Documentation
# Basic Webpack Integration · mkdir ckeditor4-webpack cd ckeditor4-webpack npm init -y · npm install --save-dev ckeditor4 webpack webpack-cli · 'use strict'; const ......
Read more >@sanity/webpack-integration - npm
Start using @sanity/webpack-integration in your project by running `npm i @sanity/webpack-integration`. There are 4 other projects in the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
oh , i solve this issue by easy way , the problem is cause by jQuery , you can use materialize package jQuery , just like :
window.$ = window.jQuery = require('materialize-css/node_modules/jquery/dist/jquery.js')
@MurhafSousli I had the same error but managed to solve it by requiring it in my entry file like:
I don’t like this but it’s working.