formatter.js icon indicating copy to clipboard operation
formatter.js copied to clipboard

Defining jQuery instead of jquery breaks webpack

Open imjakechapman opened this issue 9 years ago • 1 comments

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.

imjakechapman avatar Jul 28 '16 18:07 imjakechapman

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'
}

DevilstarII avatar Apr 18 '17 13:04 DevilstarII