jaridmargolin / formatter.js

Format html inputs to match a specified pattern
http://firstopinion.github.io/formatter.js
2.48k stars 235 forks source link

Defining jQuery instead of jquery breaks webpack #96

Open imjakechapman opened 8 years ago

imjakechapman commented 8 years ago

The jQuery package on npm is named jquery not jQuery.

So when bundling with webpack, using

{ test: require.resolve('jquery'), loader: "expose?$!expose?jQuery" }

breaks the build since this library defines['jQuery'] which the npm module does not exist.

DevilstarII commented 7 years ago

Just in case someone still needs it, and can't wait for a fix. Use it in combination with imports-loader, eg:

{
    test: require.resolve('path/to/formatter-plugin'),
    loader: 'imports-loader?define=>false'
}