Problem Description:
When importing jQuery, if index. JS
is not found, it is directly added to Vue. Config. JS
, and the following error occurs
Reason: unknown
resolvent:
Add configurewebpack
to the outer layer
const path = require('path')
var webpack = require('webpack')
function resolve(dir) {
return path.join(__dirname, dir)
}
module.exports = {
configureWebpack: {
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
"windows.jQuery": "jquery"
})
]
}
}
Read More:
- Inline JavaScript is not enabled. Is it set in your options?
- The garbage plug-in mixed in chrome causes an error in the front-end JS operation: only one instance of Babel Polyfill is allowed
- Vue Install Store Error: ‘options’ is defind but never used [How to Solve]
- After NPM run dev is running, the browser does not respond and reports an error in. / ~ / Babel loader / lib! / ~ / Vue loader / lib/ selector.js?type=script&in
- Validation error: webpack dev server invalid options
- Vue More than 1 blank line not allowed
- When starting Vue project: cannot find module ‘webpack cli/bin/config yargs’ error [How to Fix]
- Invalid host header error in Vue using peanut shell agent
- ERROR in static/js/app.xxxxxxx.js from UglifyJs Unexpected token: operator (>)
- How to handle when select single is not allowed in loop
- Vue install reports an error operation not allowed
- Vue error: no postcss config found solution
- The MAC system installs MySQL client, and the error is solved_ config not found
- Register global time filter in main.js in Vue
- VUE Error: Cannot find module ‘webpack/bin/config-yargs’
- Vue router click the menu bar and the same module reports an error Vue router.esm.js? 2215:2065 Uncaught (in promise) Error
- Function definition is not allowed here
- Validation error: compression plug invalid options
- Solve the problem that the delete request is not available under SpringBoot. There was an unexpected error (type=Method Not Allowed, status=405).
- [Error][IntelliJ IDEA] Element XXX is not allowed here