-
-
Save mucavel/cbf4ba2aaf42b6a14ffc0634bbff928a to your computer and use it in GitHub Desktop.
Use jQuery with NuxtJS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webpack = require('webpack') | |
module.exports = { | |
// other configs | |
build: { | |
plugins: [ | |
new webpack.ProvidePlugin({ | |
$: 'jquery', | |
jQuery: 'jquery', | |
'window.jQuery': 'jquery' | |
}) | |
] | |
}, | |
// other configs | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// other configs. | |
"dependencies": { | |
// Replace <jquery.version> with the jquery version you want. | |
"jquery": "<jquery.version>" | |
}, | |
// other configs. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment