bemarket/vue.config.js
2022-02-28 11:29:19 +08:00

48 lines
1.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const path = require('path')
const PrerenderSPAPlugin = require('prerender-spa-plugin')
const name = 'CEBG'
module.exports = {
// TODO: Remember to change publicPath to fit your need
publicPath: process.env.NODE_ENV === 'production' ? '/' : '/',
lintOnSave: process.env.NODE_ENV === 'development',
productionSourceMap: false,
pwa: {
name: name
},
pluginOptions: {
'style-resources-loader': {
preProcessor: 'scss',
patterns: [
path.resolve(__dirname, 'src/styles/_variables.scss'),
path.resolve(__dirname, 'src/styles/_mixins.scss')
]
}
// sitemap: {
// baseURL: 'https://cebg.games',
// routes
// }
},
chainWebpack(config) {
// provide the app's title in html-webpack-plugin's options list so that
// it can be accessed in index.html to inject the correct title.
// https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-plugin
config.plugin('html').tap(args => {
args[0].title = 'CEBG: CRYPTO ELITES BATTLEGROUNDS'
return args
})
},
configureWebpack(config) {
if (process.env.NODE_ENV === 'production') {
config.plugins.push(
new PrerenderSPAPlugin({
indexPath: path.resolve('dist/index.html'),
staticDir: path.resolve('dist'),
routes: ['/nft', '/gameplay', '/tokenomic', '/roadmap', '/team']
})
)
}
}
}