Files
morteza d0bd8291ff
deploy to danak / build_and_deploy (push) Has been cancelled
remove pwa
2026-06-27 11:10:46 +03:30

116 lines
2.9 KiB
JavaScript

const webpack = require("webpack")
const {state} = require('./store/global')
export default {
// Global page headers (https://go.nuxtjs.dev/config-head)
head: {
title: 'اراک ریل',
meta: [
{charset: 'utf-8'},
{name: 'viewport', content: 'width=device-width, initial-scale=1'},
{name: 'theme-color', content: '#303030'},
],
link: [
{rel: 'icon', type: 'image/x-icon', href: '/favicon.png'}
]
},
// Global CSS (https://go.nuxtjs.dev/config-css)
loading: {
color: '#1B407C'
},
css: [
'slick-carousel/slick/slick.css',
'slick-carousel/slick/slick-theme.css',
'element-ui/lib/theme-chalk/index.css',
'~/assets/css/bootstrap-grid.css',
'~/assets/css/reset-css.css',
'~/assets/css/fontawesome/css/all.min.css',
'~/assets/sass/main.scss'
],
// Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins)
plugins: [
'@/plugins/element-ui',
'@/plugins/ckEditor.client',
'@/plugins/datePicker.client',
'@/plugins/gsap.client'
],
// Auto import components (https://go.nuxtjs.dev/config-components)
components: true,
// Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)
buildModules: [
// '@nuxtjs/pwa'
],
// Modules (https://go.nuxtjs.dev/config-modules)
modules: [
// https://go.nuxtjs.dev/axios
'@nuxtjs/axios',
'@nuxtjs/auth'
],
// pwa: {
// manifest: {
// name: 'وزن گریتینگ',
// short_name: 'ArakRail Grating',
// // description: state().meta_description.fa,
// description: false,
// lang: 'fa',
// useWebmanifestExtension: false,
// start_url: '/fa/pwa'
// },
// meta: {
// mobileAppIOS: true,
// name: 'اراک ریل'
// },
// workbox: {
// cleanupOutdatedCaches: true
// }
// },
// Axios module configuration (https://go.nuxtjs.dev/config-axios)
axios: {
proxy: true
},
proxy: {
'/api': {target: 'http://127.0.0.1:6096'}
},
// Build Configuration (https://go.nuxtjs.dev/config-build)
build: {
transpile: [/^element-ui/],
plugins: [new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery'
})]
},
router: {
middleware: ['redirects'],
linkActiveClass: 'active'
},
server: {
host: '0.0.0.0',
port: 6096
},
serverMiddleware: ['~/api/index'],
auth: {
rewriteRedirects: true,
redirect: false,
strategies: {
local: {
endpoints: {
login: {url: '/api/auth/admin/login', method: 'post', propertyName: 'token'},
logout: {url: '/api/auth/admin/logout', method: 'post'},
user: {url: '/api/auth/admin/user', method: 'get', propertyName: 'user'}
},
tokenRequired: true,
tokenType: '',
globalToken: true,
autoFetchUser: true
}
}
}
}