Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuxt 2.6.3 error '$' is not defined no-undef #5607

Closed
jackpi2018 opened this issue Apr 26, 2019 · 2 comments
Closed

Nuxt 2.6.3 error '$' is not defined no-undef #5607

jackpi2018 opened this issue Apr 26, 2019 · 2 comments
Labels

Comments

@jackpi2018
Copy link

jackpi2018 commented Apr 26, 2019

This is not working in Nuxt 2.6.3. But in Nuxt 1.4.5 it works
import webpack from 'webpack'

export default {
build: {
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery:"jquery",
'window.jQuery':"jquery"
})
],
}
}
Is there any changes in 2.6.3 about this?

This question is available on Nuxt community (#c9115)
@ghost ghost closed this as completed Apr 26, 2019
@ghost ghost added the cmty:question label Apr 26, 2019
@ghost
Copy link

ghost commented Apr 26, 2019

This issue as been imported as question since it does not respect nuxt.js issue template. Only bug reports and feature requests stays open to reduce maintainers workload.
If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically.
Your question is available at https://cmty.app/nuxt/nuxt.js/issues/c9115.

@miilord
Copy link

miilord commented Apr 13, 2020

set

env: {
  ...
  jquery: true
},

in .eslintrc.js

and

build: {
  ...
  plugins: [
    new webpack.ProvidePlugin({
      $: 'jquery'
    })
  ],
}

in nuxt.config.js

@danielroe danielroe added the 2.x label Jan 18, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants