import js file into hello.vue
-
im not good in vue js, but i want to to use quasar for my project, please help me
how to import a js file and use in hello.vue filehere is my code
// assets/alldata.js
export default { allchapters: ‘20’, allmal: ‘30’ }// Components/hello.vue
import Qdata from 'assets/alldatabut im seeing a lot of errors in output
-
anyone ?
-
You need to read and understand the lint errors, not ignore them.
It’s quite restrictive and in most cases they are exactly what they say they are. -
you say this has error?
export default { allchapters: ‘20’, allmal: ‘30’ }
?? -
These are the ESLint errors. It says right there what it wants from you in the files. Such as:
no-multiple-empty-lines
-> this means you have more than one empty line in your code.
no-multiple-spaces
-> this means you have somewhere more than one space in your code. -
@rashidnk you need to comment out the eslint rules to avoid error. go to webpack.base.conf.js file and do the following changes.
module: {
rules: [
/* { // eslint
enforce: ‘pre’,
test: /.(vue|js)$/,
loader: ‘eslint-loader’,
include: projectRoot,
exclude: /node_modules/,
options: {
formatter: require(‘eslint-friendly-formatter’)
}
}, */
…keep all the rules as it is …
]
} -
thank you, now it works