Question: build this with webpack/es6
See original GitHub issueHi, i use webpack as build system. But unable to build this plugin
My code
import jQuery from 'jquery'
import Inputmask from 'jquery.inputmask'
let im = new Inputmask(maskOpts)
im.mask(inputElementRef)
But always fail on client-side with error: “this.each is not a function” $.fn.inputmask.$.fn.inputmask @ jquery.inputmask.js:52
Im not familiar with AMD loader. it posible build this with webpack?
Issue Analytics
- State:
- Created 8 years ago
- Comments:21 (9 by maintainers)
Top Results From Across the Web
Setting Up Webpack - ECMAScript 6 Tutorial
Step 1: Set Up Webpack · On the command line, make sure you are in the es6-tutorial directory and install the babel-loader and...
Read more >How can I use ES6 in webpack.config.js?
Try naming your config as webpack.config.babel.js . You should have babel-register included in the project. Example at react-router-bootstrap.
Read more >Writing client-side ES6 with webpack
webpack is a client-side module builder and module loader. This blog post shows you how to write ECMAScript 6 code with it.
Read more >Building modular javascript applications in ES6 with React, ...
Luckily for us Webpack allows requiring pretty much any types of files using loaders. Idea behind loaders is pretty simple — they are...
Read more >Tree Shaking
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
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 FreeTop 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
Top GitHub Comments
@whooehoo a month late but if you are still trying to get jquery.inputmask to work with webpack here’s a ‘basic’ gist that works.
@RobinHerbots @Bogdaan
Not sure if this is your problem bogdaan as I’m not trying the jquery implementation. Are you loading the dependency lib?
Here’s how i just set things up with jqlite
Import in your app like so:
to make the module available by that name you have to alias it and the dep lib
webpack config (using the jqlite dep lib, swap this out for jquery if you use that instead):