2025-07-29 00:28:56 +08:00
const axios = require ( 'axios' )
2025-06-28 21:10:52 +08:00
const env = require ( './env' ) ;
const webpack = require ( 'webpack' )
export default {
buildDir : 'nuxt-dist' ,
2025-07-01 00:52:46 +08:00
transition : {
name : 'page' ,
mode : 'out-in'
} ,
2025-06-28 21:10:52 +08:00
/ *
* * Headers of the page
* /
head : {
title : 'China Trailer, Truck, Trailer Parts, Truck Parts Manufacturers and Factory - Price - SINOTRUCK' ,
meta : [
{ charset : 'utf-8' } ,
{ name : 'apple-mobile-web-app-capable' , content : "yes" } ,
{ name : 'viewport' , content : 'width=device-width, initial-scale=1' } ,
{ hid : 'http-equiv' , 'http-equiv' : "X-UA-Compatible" , content : "IE=edge" } ,
{
name : 'keywords' ,
content : 'China Trailer, Truck, Trailer Parts, Truck Parts Manufacturers and Factory - Price - SINOTRUCK,trailer, truck, trailer parts, truck parts'
} ,
{
name : 'description' ,
content : 'Sinotruck Howo Sales Co.,Ltd is one of the most professional trailer, truck, trailer parts, truck parts manufacturers in China. Our factory brings here a great selection of truck for sale. Welcome to consult price with us.'
}
] ,
link : [
{ rel : 'icon' , type : 'image/x-icon' , href : '/favicon.ico' }
] ,
script : [
// { type:"text/javascript" , src: 'https://api.map.baidu.com/api?v=1.0&type=webgl&ak=otBoKESzaUj1nGjWiehnCP3AUyRKgikx'}
]
} ,
env : {
NUXT _ENV : env [ process . env . MODE ]
} ,
/ *
* * Customize the progress - bar color
* /
2025-07-01 00:52:46 +08:00
loading : { color : '#015fe8' } ,
2025-06-28 21:10:52 +08:00
/ *
* * Global CSS
* /
css : [
'~assets/css/base.css' ,
'~assets/css/quill.bubble.css' ,
'~assets/css/quill.snow.css' ,
'~assets/css/quill.core.css' ,
2025-07-04 01:00:28 +08:00
'~assets/css/common.scss' ,
'element-ui/lib/theme-chalk/index.css'
2025-06-28 21:10:52 +08:00
] ,
/ *
* * Plugins to load before mounting the App
* /
plugins : [
'~plugins/main' ,
'~plugins/axios' ,
2025-07-21 15:47:14 +08:00
// { src: "~plugins/websocket.js", ssr: true },
2025-06-28 21:10:52 +08:00
{ src : "~plugins/router.js" , ssr : true } ,
2025-06-29 01:26:10 +08:00
{ src : "~plugins/i18n.js" , ssr : true } ,
2025-07-06 18:38:53 +08:00
{ src : "~plugins/element-ui.js" , ssr : true } ,
2025-07-06 16:16:34 +08:00
{ src : "~plugins/vue-piczoom.js" , ssr : false } ,
{ src : "~plugins/swiper.js" , ssr : false } ,
2025-06-28 21:10:52 +08:00
] ,
/ *
* * Nuxt . js modules
* /
modules : [
// Doc: https://bootstrap-vue.js.org/docs/
'@nuxtjs/axios' ,
'cookie-universal-nuxt' ,
'nuxt-sass-resources-loader' ,
'bootstrap-vue/nuxt' ,
2025-07-29 00:28:56 +08:00
'@nuxtjs/sitemap'
2025-06-28 21:10:52 +08:00
] ,
2025-06-30 02:10:35 +08:00
bootstrapVue : {
icons : false
} ,
2025-07-29 00:28:56 +08:00
sitemap : {
hostname : 'http://122.51.230.86:8099' ,
sitemaps : [
{
path : '/sitemap.xml' ,
routes : [
'/pages.xml' ,
'/products.xml' ,
'/inquiry.xml' ,
'/article-page.xml' ,
] ,
gzip : true
} ,
{
path : '/pages.xml' ,
routes : [ '/' ] ,
} ,
{
path : '/products.xml' ,
routes : async ( ) => {
const { data : res } = await axios . get ( 'http://122.51.230.86:8099/web/prodPageList?pageNum=1&pageSize=9&catgId=43bb1e22091c0f674453c8db7e89b4a3&tenantId=main' )
return res . data . records . map ( item => {
return {
url : ` /products/ ${ item . id } ` ,
changefreq : 'daily' ,
priority : 1
}
} )
} ,
gzip : true
}
]
} ,
2025-06-29 01:26:10 +08:00
router : {
2025-07-24 00:18:40 +08:00
middleware : [ 'i18n' , 'footer' , 'header' ]
2025-06-29 01:26:10 +08:00
} ,
2025-06-28 21:10:52 +08:00
/ *
* * Build configuration
* /
distDir : 'build' ,
build : {
2025-06-30 02:10:35 +08:00
postcss : null ,
2025-06-28 21:10:52 +08:00
/ *
* * You can extend webpack config here
* /
extend ( config , ctx ) {
} ,
plugins : [
new webpack . ProvidePlugin ( {
$ : "jquery" ,
jQuery : "jquery" ,
"windows.jQuery" : "jquery" ,
'root.jQuery' : 'jquery'
2025-06-30 02:10:35 +08:00
} ) ,
2025-06-28 21:10:52 +08:00
] ,
2025-06-30 02:10:35 +08:00
babel : {
compact : false ,
configFile : false ,
babelrc : false ,
presets : [
[
'@nuxt/babel-preset-app' ,
{
useBuiltIns : 'entry' ,
corejs : 3
}
]
] ,
plugins : [
[ "@babel/plugin-proposal-decorators" , { "legacy" : true } ] ,
[ "@babel/plugin-proposal-class-properties" , { "loose" : true } ] ,
[ "@babel/plugin-proposal-private-methods" , { "loose" : true } ] ,
2025-07-04 01:00:28 +08:00
[ "@babel/plugin-proposal-private-property-in-object" , { "loose" : true } ] ,
2025-06-30 02:10:35 +08:00
]
} ,
2025-06-28 21:10:52 +08:00
transpile : [
'bootstrap-vue' ,
2025-07-04 01:00:28 +08:00
'element-ui' ,
2025-06-30 02:10:35 +08:00
]
2025-06-28 21:10:52 +08:00
} ,
generate : {
routes : [
]
} ,
server : {
port : 3001 ,
host : '0.0.0.0' , // default: localhost
2025-07-19 11:54:56 +08:00
proxy : {
'/dev' : {
target : 'http://192.168.1.17:8099/' ,
pathRewrite : { '^/dev' : '' } ,
changeOrigin : true ,
}
}
2025-06-28 21:10:52 +08:00
} ,
}