Skip to content

Instantly share code, notes, and snippets.

@dieg0
Created November 21, 2023 12:08
Show Gist options
  • Save dieg0/80e89552f8c8730d6674418292b14bfa to your computer and use it in GitHub Desktop.
Save dieg0/80e89552f8c8730d6674418292b14bfa to your computer and use it in GitHub Desktop.
upgrade quasar 2 failing config
const ESLintPlugin = require('eslint-webpack-plugin')
module.exports = function (ctx) {
return {
boot: [
'api',
'config',
'axios',
'i18n',
'permission',
'fire',
'sentry',
'mixpanel'
],
preFetch: true,
css: [
'app.sass'
],
extras: [
'themify',
'roboto-font',
'material-icons',
'mdi-v5'
],
framework: {
iconSet: 'material-icons',
lang: 'en-US',
importStrategy: 'auto',
components: [],
directives: [],
plugins: [
'Cookies',
'Loading',
'LoadingBar',
'Notify',
'Dialog'
],
config: {
loadingBar: {
color: 'company-purple',
position: 'top'
}
}
},
build: {
scopeHoisting: true,
vueRouterMode: 'hash',
showProgress: true,
gzip: false,
analyze: false,
chainWebpack (chain) {
chain.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{ extensions: ['js', 'vue'] }])
},
publicPath: 'static'
},
devServer: {
server: {
type: 'http'
},
port: 8080,
open: 'true'
},
animations: [],
ssr: {
pwa: false,
prodPort: 3000,
maxAge: 1000 * 60 * 60 * 24 * 30,
chainWebpackWebserver (chain) {
chain.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{ extensions: [ 'js' ] }])
},
middlewares: [
ctx.prod ? 'compression' : '',
'render'
]
},
pwa: {
workboxPluginMode: 'GenerateSW',
workboxOptions: {
skipWaiting: true,
clientsClaim: true,
maximumFileSizeToCacheInBytes: 5000000
},
chainWebpackCustomSW (chain) {
chain.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{ extensions: [ 'js' ] }])
},
manifest: {
name: 'Company',
short_name: 'Company',
description: 'Company Portal',
display: 'standalone',
orientation: 'portrait',
background_color: '#522f81',
theme_color: '#522f81',
start_url: './index.html',
icons: [
// ... icon assets
]
},
metaVariables: {
appleMobileWebAppCapable: 'yes',
appleMobileWebAppStatusBarStyle: 'default',
appleTouchIcon120: 'statics/logo_120x120.png',
// ... other icon assets
},
htmlVariables: {
productName: 'Company portal',
productDescription: 'Company desc.'
}
},
cordova: {
id: 'org.cordova.quasar.app'
},
capacitor: {
hideSplashscreen: false
},
electron: {
bundler: 'packager',
packager: {},
builder: {
appId: 'company_portal'
},
nodeIntegration: true,
chainWebpackMain (chain) {
chain.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{ extensions: [ 'js' ] }])
},
chainWebpackPreload (chain) {
chain.plugin('eslint-webpack-plugin')
.use(ESLintPlugin, [{ extensions: [ 'js' ] }])
},
htmlVariables: {
productName: 'Company portal',
productDescription: 'Company desc.'
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment