2018-10-12 16:42:54 +02:00
|
|
|
// Configuration for your app
|
2018-10-13 19:14:58 +02:00
|
|
|
|
2018-11-02 20:10:45 +01:00
|
|
|
const path = require('path');
|
2019-02-27 02:58:41 +01:00
|
|
|
const helpers = require('./helpers');
|
2018-11-05 22:28:59 +01:00
|
|
|
const webpack = require('webpack')
|
|
|
|
|
const envparser = require('./config/envparser')
|
|
|
|
|
|
2018-11-02 22:15:48 +01:00
|
|
|
|
2018-11-02 15:56:29 +01:00
|
|
|
const extendTypescriptToWebpack = (config) => {
|
|
|
|
|
config.resolve
|
|
|
|
|
.extensions
|
2018-11-17 20:32:28 +01:00
|
|
|
.add('.ts', '.js', '.vue')
|
|
|
|
|
config.resolve
|
|
|
|
|
.alias
|
2019-02-27 02:58:41 +01:00
|
|
|
.set('@components', helpers.root('src/components/index.ts'))
|
|
|
|
|
// .set('@components', helpers.root('src/components'))
|
2019-03-22 15:32:32 +01:00
|
|
|
.set('@views', helpers.root('src/views/index.ts'))
|
2019-02-27 02:58:41 +01:00
|
|
|
// .set('@views', helpers.root('src/components/views'))
|
|
|
|
|
.set('@src', helpers.root('src'))
|
2019-03-21 20:43:15 +01:00
|
|
|
.set('@css', helpers.root('src/statics/css/variables.scss'))
|
2019-02-27 02:58:41 +01:00
|
|
|
.set('@icons', helpers.root('src/statics/icons/*'))
|
2019-03-05 23:44:48 +01:00
|
|
|
.set('@images', helpers.root('src/statics/images/*'))
|
2019-02-27 02:58:41 +01:00
|
|
|
.set('@classes', helpers.root('src/classes/index.ts'))
|
|
|
|
|
.set('@utils', helpers.root('src/utils/index.ts'))
|
|
|
|
|
.set('@utils', helpers.root('src/utils/*'))
|
|
|
|
|
.set('@router', helpers.root('src/router/index.ts'))
|
|
|
|
|
.set('@validators', helpers.root('src/utils/validators.ts'))
|
2019-03-21 20:43:15 +01:00
|
|
|
.set('@methods', helpers.root('src/utils/methods.ts'))
|
2019-02-27 02:58:41 +01:00
|
|
|
.set('@api', helpers.root('src/store/Api/index.ts'))
|
|
|
|
|
.set('@paths', helpers.root('src/store/Api/ApiRoutes.ts'))
|
|
|
|
|
.set('@types', helpers.root('src/typings/index.ts'))
|
|
|
|
|
.set('@store', helpers.root('src/store/index.ts'))
|
|
|
|
|
.set('@modules', helpers.root('src/store/Modules/index.ts'))
|
2018-11-02 15:56:29 +01:00
|
|
|
config.module
|
|
|
|
|
.rule('typescript')
|
|
|
|
|
.test(/\.tsx?$/)
|
|
|
|
|
.use('typescript')
|
|
|
|
|
.loader('ts-loader')
|
|
|
|
|
.options({
|
|
|
|
|
appendTsSuffixTo: [/\.vue$/],
|
|
|
|
|
onlyCompileBundledFiles: true
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
|
2018-11-08 01:09:33 +01:00
|
|
|
const extendHTMLToWebpack = (config) => {
|
|
|
|
|
config.resolve
|
|
|
|
|
.extensions
|
|
|
|
|
.add('.html');
|
|
|
|
|
config.module
|
|
|
|
|
.rule('html')
|
|
|
|
|
.test(/\.html?$/)
|
|
|
|
|
.use('html')
|
|
|
|
|
.loader('vue-html-loader')
|
|
|
|
|
};
|
|
|
|
|
|
2018-10-12 16:42:54 +02:00
|
|
|
module.exports = function (ctx) {
|
|
|
|
|
return {
|
2019-03-16 23:47:13 +01:00
|
|
|
htmlVariables: {
|
|
|
|
|
appName: 'FreePlanet',
|
|
|
|
|
appDescription: 'The first Real Social, Free, Fair and Equitable'
|
2019-03-11 19:16:39 +01:00
|
|
|
},
|
|
|
|
|
// Quasar looks for *.js files by default
|
|
|
|
|
sourceFiles: {
|
|
|
|
|
router: 'src/router/index.ts',
|
|
|
|
|
store: 'src/store/index.ts'
|
|
|
|
|
},
|
2018-11-02 20:10:45 +01:00
|
|
|
// app plugins (/src/plugins)
|
2019-10-18 01:47:36 +02:00
|
|
|
boot: ['vue-i18n', 'vue-meta', 'axios', 'vee-validate', 'myconfig', 'local-storage', 'error-handler', 'globalroutines', 'vue-idb', 'dragula', 'guard'],
|
2018-10-12 16:42:54 +02:00
|
|
|
css: [
|
|
|
|
|
'app.styl'
|
|
|
|
|
],
|
|
|
|
|
extras: [
|
2018-10-13 19:14:58 +02:00
|
|
|
'roboto-font',
|
|
|
|
|
'material-icons', // optional, you are not bound to it
|
2019-03-11 19:16:39 +01:00
|
|
|
'ionicons-v4',
|
|
|
|
|
// 'mdi-v3',
|
|
|
|
|
'fontawesome-v5'
|
2018-10-12 16:42:54 +02:00
|
|
|
],
|
|
|
|
|
supportIE: false,
|
2019-03-05 23:44:48 +01:00
|
|
|
aliases: {
|
2019-03-11 19:16:39 +01:00
|
|
|
quasar: path.resolve(__dirname, '../node_modules/@quasar/'),
|
2019-03-05 23:44:48 +01:00
|
|
|
src: path.resolve(__dirname, '../src'),
|
|
|
|
|
statics: path.resolve(__dirname, '../src/statics'),
|
|
|
|
|
components: path.resolve(__dirname, '../src/components')
|
|
|
|
|
},
|
2018-10-12 16:42:54 +02:00
|
|
|
build: {
|
2018-11-08 01:09:33 +01:00
|
|
|
showProgress: true,
|
2018-11-05 22:28:59 +01:00
|
|
|
env: envparser(),
|
2018-10-12 16:42:54 +02:00
|
|
|
scopeHoisting: true,
|
2018-11-02 15:56:29 +01:00
|
|
|
vueRouterMode: 'history',
|
|
|
|
|
vueCompiler: true,
|
2018-12-26 21:02:16 +01:00
|
|
|
gzip: false, // gzip true
|
|
|
|
|
analyze: false, // true
|
2018-10-12 16:42:54 +02:00
|
|
|
// extractCSS: false,
|
2018-11-02 15:56:29 +01:00
|
|
|
chainWebpack(config) {
|
|
|
|
|
extendTypescriptToWebpack(config);
|
2018-11-08 01:09:33 +01:00
|
|
|
// extendHTMLToWebpack(config);
|
2018-11-02 15:56:29 +01:00
|
|
|
config.resolve
|
|
|
|
|
.alias
|
|
|
|
|
.set('~', __dirname)
|
2019-02-27 02:58:41 +01:00
|
|
|
.set('@', helpers.root('src'))
|
2019-03-16 23:47:13 +01:00
|
|
|
// .set('env', helpers.root('config/helpers/env.js'))
|
2018-11-02 15:56:29 +01:00
|
|
|
config.module
|
|
|
|
|
.rule('template-engine')
|
|
|
|
|
.test(/\.pug$/)
|
|
|
|
|
.use('pug')
|
|
|
|
|
.loader('pug-plain-loader')
|
2018-12-26 21:02:16 +01:00
|
|
|
/*config.module
|
|
|
|
|
.rule('template-engine')
|
|
|
|
|
.test(/\.(gql|graphql)$/)
|
|
|
|
|
.loader('graphql-tag/loader') */
|
2018-10-12 16:42:54 +02:00
|
|
|
}
|
|
|
|
|
},
|
2018-12-26 21:02:16 +01:00
|
|
|
dev: {
|
|
|
|
|
env: require('./.env.development'),
|
|
|
|
|
},
|
2018-10-12 16:42:54 +02:00
|
|
|
devServer: {
|
2018-11-02 20:10:45 +01:00
|
|
|
https: false,
|
2019-07-10 11:37:00 +02:00
|
|
|
port: 8082,
|
2018-12-06 20:07:51 +01:00
|
|
|
open: false // opens browser window automatically
|
2018-10-12 16:42:54 +02:00
|
|
|
},
|
2018-11-02 20:10:45 +01:00
|
|
|
// framework: 'all' --- includes everything; for dev only!
|
2018-10-12 16:42:54 +02:00
|
|
|
framework: {
|
|
|
|
|
components: [
|
|
|
|
|
'QLayout',
|
2019-03-11 19:16:39 +01:00
|
|
|
'QDrawer',
|
|
|
|
|
'QItemSection',
|
|
|
|
|
'QHeader',
|
|
|
|
|
'QFooter',
|
2018-10-12 16:42:54 +02:00
|
|
|
'QPageContainer',
|
|
|
|
|
'QPage',
|
2019-03-11 19:16:39 +01:00
|
|
|
'QPopupProxy',
|
2018-10-12 16:42:54 +02:00
|
|
|
'QToolbar',
|
|
|
|
|
'QToolbarTitle',
|
|
|
|
|
'QBtn',
|
2019-01-16 02:26:43 +01:00
|
|
|
'QBtnDropdown',
|
2019-07-12 18:23:16 +02:00
|
|
|
'QColor',
|
2018-10-12 16:42:54 +02:00
|
|
|
'QIcon',
|
|
|
|
|
'QList',
|
2019-03-11 19:16:39 +01:00
|
|
|
'QItemLabel',
|
2018-10-12 16:42:54 +02:00
|
|
|
'QItem',
|
|
|
|
|
'QCard',
|
2019-07-12 18:23:16 +02:00
|
|
|
'QMarkupTable',
|
|
|
|
|
'QSpace',
|
|
|
|
|
'QDialog',
|
|
|
|
|
'QBadge',
|
|
|
|
|
'QForm',
|
2019-03-11 19:16:39 +01:00
|
|
|
'QCardSection',
|
2018-10-12 16:42:54 +02:00
|
|
|
'QCardActions',
|
|
|
|
|
'QField',
|
2018-10-20 18:56:31 +02:00
|
|
|
'QInput',
|
2018-10-12 16:42:54 +02:00
|
|
|
'QSelect',
|
2019-03-11 19:16:39 +01:00
|
|
|
'QMenu',
|
2018-10-13 19:14:58 +02:00
|
|
|
'QToggle',
|
|
|
|
|
'QFab',
|
|
|
|
|
'QInfiniteScroll',
|
|
|
|
|
'QAjaxBar',
|
|
|
|
|
'QChip',
|
2019-03-11 19:16:39 +01:00
|
|
|
'QExpansionItem',
|
2018-10-14 22:10:00 +02:00
|
|
|
'QCheckbox',
|
2019-03-11 19:16:39 +01:00
|
|
|
'QBanner',
|
2018-10-26 22:25:35 +02:00
|
|
|
'QInnerLoading',
|
|
|
|
|
'QSpinnerGears',
|
2019-03-11 19:16:39 +01:00
|
|
|
'QDate',
|
|
|
|
|
'QTime',
|
2019-01-05 20:11:41 +01:00
|
|
|
'QSlideTransition',
|
2019-01-07 01:18:58 +01:00
|
|
|
'QTable',
|
2019-02-22 10:23:00 +01:00
|
|
|
'QTh',
|
|
|
|
|
'QTr',
|
|
|
|
|
'QTd',
|
2019-03-11 19:16:39 +01:00
|
|
|
'QLinearProgress',
|
2019-01-29 00:48:04 +01:00
|
|
|
'QSlider',
|
2019-02-19 18:44:48 +01:00
|
|
|
'QPopupEdit',
|
2019-03-11 19:16:39 +01:00
|
|
|
'QCarousel',
|
2019-03-14 01:24:59 +01:00
|
|
|
'QCarouselControl',
|
2019-04-11 14:25:43 +02:00
|
|
|
'QCarouselSlide',
|
2019-03-14 21:09:41 +01:00
|
|
|
'QPageScroller',
|
|
|
|
|
'QAvatar',
|
|
|
|
|
'QImg',
|
2019-03-30 02:57:40 +01:00
|
|
|
'QSplitter',
|
2019-04-25 00:30:13 +02:00
|
|
|
'QRating',
|
2019-07-12 18:23:16 +02:00
|
|
|
'QParallax',
|
|
|
|
|
'QTab',
|
|
|
|
|
'QTabs',
|
|
|
|
|
'QTabPanels',
|
|
|
|
|
'QTabPanel',
|
|
|
|
|
'QTree',
|
2019-04-11 14:25:43 +02:00
|
|
|
'QSeparator'
|
2018-10-12 16:42:54 +02:00
|
|
|
],
|
|
|
|
|
directives: [
|
2018-11-02 20:10:45 +01:00
|
|
|
'Ripple',
|
2019-03-22 01:00:41 +01:00
|
|
|
'ClosePopup'
|
2018-10-12 16:42:54 +02:00
|
|
|
],
|
|
|
|
|
// Quasar plugins
|
|
|
|
|
plugins: [
|
2019-02-22 10:23:00 +01:00
|
|
|
'Meta',
|
2019-01-29 23:13:28 +01:00
|
|
|
'Dialog',
|
2018-11-02 20:10:45 +01:00
|
|
|
'Notify',
|
|
|
|
|
'Cookies',
|
2019-03-11 19:16:39 +01:00
|
|
|
'Loading'
|
2018-10-12 16:42:54 +02:00
|
|
|
],
|
2019-03-11 19:16:39 +01:00
|
|
|
iconSet: 'fontawesome-v5',
|
|
|
|
|
lang: 'it', // Quasar language
|
2018-10-12 16:42:54 +02:00
|
|
|
},
|
2019-03-13 18:11:26 +01:00
|
|
|
animations: 'all',
|
2018-10-12 16:42:54 +02:00
|
|
|
ssr: {
|
2018-11-02 20:10:45 +01:00
|
|
|
pwa: {
|
|
|
|
|
runtimeCaching: [
|
|
|
|
|
{
|
2019-03-05 23:44:48 +01:00
|
|
|
urlPattern: '/statics',
|
2018-11-02 20:10:45 +01:00
|
|
|
handler: 'networkFirst'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
2018-10-12 16:42:54 +02:00
|
|
|
},
|
|
|
|
|
pwa: {
|
2019-01-31 13:52:52 +01:00
|
|
|
// runtimeCaching: [
|
|
|
|
|
// {
|
2019-03-05 23:44:48 +01:00
|
|
|
// urlPattern: '/statics',
|
2019-01-31 13:52:52 +01:00
|
|
|
// handler: 'networkFirst'
|
|
|
|
|
// }
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
|
|
// workboxPluginMode: 'GenerateSW',
|
2018-10-12 16:42:54 +02:00
|
|
|
workboxPluginMode: 'InjectManifest',
|
2019-01-31 13:52:52 +01:00
|
|
|
workboxOptions: {
|
2019-03-17 02:47:22 +01:00
|
|
|
// skipWaiting: true,
|
|
|
|
|
// clientsClaim: true
|
2019-01-31 13:52:52 +01:00
|
|
|
// swSrc: 'src/sw.js',
|
|
|
|
|
},
|
2018-10-12 16:42:54 +02:00
|
|
|
manifest: {
|
2019-03-16 23:47:13 +01:00
|
|
|
name: 'FreePlanet',
|
2019-02-13 01:51:59 +01:00
|
|
|
version: '0.0.14',
|
2018-12-10 11:38:22 +01:00
|
|
|
short_name: 'freeplanet',
|
2018-12-23 00:31:34 +01:00
|
|
|
description: 'Social project in order to connecting people each others (working in progress...)',
|
2018-10-12 16:42:54 +02:00
|
|
|
display: 'standalone',
|
|
|
|
|
orientation: 'portrait',
|
2019-01-09 00:31:16 +01:00
|
|
|
theme_color: '#ffffff',
|
2018-10-12 16:42:54 +02:00
|
|
|
background_color: '#ffffff',
|
|
|
|
|
icons: [
|
|
|
|
|
{
|
2019-01-09 00:31:16 +01:00
|
|
|
'src': 'statics/icons/android-chrome-192x192.png',
|
2018-10-12 16:42:54 +02:00
|
|
|
'sizes': '192x192',
|
|
|
|
|
'type': 'image/png'
|
|
|
|
|
},
|
|
|
|
|
{
|
2019-01-09 00:31:16 +01:00
|
|
|
'src': 'statics/icons/android-chrome-512x512',
|
2018-10-12 16:42:54 +02:00
|
|
|
'sizes': '512x512',
|
|
|
|
|
'type': 'image/png'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
};
|