Browse Source

fix(gui-v2): favicon.ico

pull/3387/head
Wing-Kam Wong 2 years ago
parent
commit
c754bd461d
  1. 2
      packages/nc-gui-v2/nuxt.config.ts
  2. 0
      packages/nc-gui-v2/public/favicon.ico
  3. 156
      packages/nc-gui/nuxt.config.js

2
packages/nc-gui-v2/nuxt.config.ts

@ -29,7 +29,7 @@ export default defineNuxtConfig({
{
rel: 'icon',
type: 'image/x-icon',
href: './favicon-32.png',
href: './favicon.ico',
},
],
meta: [

0
packages/nc-gui-v2/public/favicon-32.png → packages/nc-gui-v2/public/favicon.ico

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

156
packages/nc-gui/nuxt.config.js

@ -1,24 +1,24 @@
import MonacoEditorWebpackPlugin from 'monaco-editor-webpack-plugin'
import MonacoEditorWebpackPlugin from 'monaco-editor-webpack-plugin';
// import HtmlWebpackPlugin from 'html-webpack-plugin';
const fs = require('fs')
const packageJson = JSON.parse(fs.readFileSync('../nc-lib-gui/package.json', 'utf8'))
const fs = require('fs');
const packageJson = JSON.parse(fs.readFileSync('../nc-lib-gui/package.json', 'utf8'));
export default {
/*
** Nuxt rendering mode
** See https://nuxtjs.org/api/configuration-mode
*/
** Nuxt rendering mode
** See https://nuxtjs.org/api/configuration-mode
*/
mode: 'spa',
// ssr: false,
/*
** Nuxt target
** See https://nuxtjs.org/api/configuration-target
*/
** Nuxt target
** See https://nuxtjs.org/api/configuration-target
*/
target: 'server',
/*
** Headers of the page
** See https://nuxtjs.org/api/configuration-head
*/
** Headers of the page
** See https://nuxtjs.org/api/configuration-head
*/
head: {
titleTemplate: '',
title: 'NocoDB',
@ -26,53 +26,53 @@ export default {
{ charset: 'utf-8' },
{
name: 'viewport',
content: 'width=device-width, initial-scale=1'
content: 'width=device-width, initial-scale=1',
},
{
hid: 'description',
name: 'description',
content: process.env.npm_package_description || ''
}
content: process.env.npm_package_description || '',
},
],
link: [
{
rel: 'icon',
type: 'image/x-icon',
href: './favicon-32.png'
}
]
href: './favicon.ico',
},
],
},
/*
** Global CSS
*/
** Global CSS
*/
/*
** Plugins to load before mounting the App
** https://nuxtjs.org/guide/plugins
*/
** Plugins to load before mounting the App
** https://nuxtjs.org/guide/plugins
*/
plugins: [
{ src: '~plugins/api.js' },
'~/plugins/xutils.js',
{
src: '~plugins/localStorage.js',
ssr: false
ssr: false,
},
{
src: '~plugins/confetti.js',
ssr: false
ssr: false,
},
{
src: '~plugins/domPurify.js',
ssr: false
ssr: false,
},
{
src: '~plugins/axiosInterceptor.js',
ssr: false
ssr: false,
},
'@/plugins/veeValidate',
'@/plugins/vueTour',
{
src: '@/plugins/vueShortkey',
ssr: false
ssr: false,
},
'@/plugins/vueClipboard',
'@/plugins/globalComponentLoader',
@ -82,65 +82,63 @@ export default {
'~/plugins/i18n.js',
{
src: '~plugins/projectLoader.js',
ssr: false
ssr: false,
},
{
src: '~/plugins/tele.js',
ssr: false
}
ssr: false,
},
],
/*
** Auto import components
** See https://nuxtjs.org/api/configuration-components
*/
** Auto import components
** See https://nuxtjs.org/api/configuration-components
*/
// components: true,
/*
** Nuxt.js dev-modules
*/
buildModules: [
'@nuxtjs/vuetify'
],
** Nuxt.js dev-modules
*/
buildModules: ['@nuxtjs/vuetify'],
/*
** Nuxt.js modules
*/
** Nuxt.js modules
*/
modules: [
// Doc: https://axios.nuxtjs.org/usage
'@nuxtjs/axios',
'vue-github-buttons/nuxt',
'@nuxtjs/toast'
'@nuxtjs/toast',
],
toast: {
position: 'top-center'
position: 'top-center',
},
/*
** Axios module configuration
** See https://axios.nuxtjs.org/options
*/
** Axios module configuration
** See https://axios.nuxtjs.org/options
*/
axios: {
baseURL: process.env.NC_BACKEND_URL || (process.env.NODE_ENV === 'production' ? '..' : 'http://localhost:8080')
baseURL: process.env.NC_BACKEND_URL || (process.env.NODE_ENV === 'production' ? '..' : 'http://localhost:8080'),
},
/*
** vuetify module configuration
** https://github.com/nuxt-community/vuetify-module
*/
** vuetify module configuration
** https://github.com/nuxt-community/vuetify-module
*/
router: {
mode: 'hash',
// base: '/xc/',
middleware: ['auth']
middleware: ['auth'],
},
vuetify: {
defaultAssets: {
// font: false,
icons: false
icons: false,
},
optionsPath: '@/config/vuetify.options.js',
treeShake: true,
customVariables: ['./config/variables.scss']
customVariables: ['./config/variables.scss'],
},
/*
** Build configuration
** See https://nuxtjs.org/api/configuration-build/
*/
** Build configuration
** See https://nuxtjs.org/api/configuration-build/
*/
build: {
parallel: true,
plugins: [
@ -151,21 +149,18 @@ export default {
// e.g. Build full languages support with webpack 4.0 takes over 80 seconds
// Languages are loaded on demand at runtime
languages: ['sql', 'json', 'javascript'],
features: ['!gotoSymbol']
})
features: ['!gotoSymbol'],
}),
],
// publicPath: process.env.NODE_ENV === 'production' ? `https://cdn.jsdelivr.net/npm/nc-lib-gui@${version}/lib/dist/` : undefined,
publicPath: process.env.NODE_ENV === 'production' ? './_nuxt/' : undefined,
extend(config, {
isDev,
isClient
}) {
extend(config, { isDev, isClient }) {
if (isDev) {
config.devtool = isClient ? 'source-map' : 'inline-source-map'
config.devtool = isClient ? 'source-map' : 'inline-source-map';
}
config.externals = config.externals || {}
config.externals['@microsoft/typescript-etw'] = 'FakeModule'
config.externals = config.externals || {};
config.externals['@microsoft/typescript-etw'] = 'FakeModule';
// config.plugins.push(new MonacoEditorWebpackPlugin({
// languages: ['javascript', 'typescript', 'json', 'mysql', 'sql', 'pgsql'],
@ -204,12 +199,12 @@ export default {
if (process.env.targetEnv === 'DEV') {
// nightly build
// e.g. 0.84.2-20220220-1250
packageJson.version = `${packageJson.version}-${process.env.targetVersion}`
packageJson.name += '-daily'
packageJson.version = `${packageJson.version}-${process.env.targetVersion}`;
packageJson.name += '-daily';
} else {
packageJson.version = process.env.targetVersion
packageJson.version = process.env.targetVersion;
}
fs.writeFileSync('../nc-lib-gui/package.json', JSON.stringify(packageJson, 0, 2))
fs.writeFileSync('../nc-lib-gui/package.json', JSON.stringify(packageJson, 0, 2));
// config.output.publicPath = `https://cdn.jsdelivr.net/npm/nc-lib-gui@${version}/lib/dist/`;
// const htmlWebpack = config.plugins.find(w => w instanceof HtmlWebpackPlugin);
@ -221,18 +216,17 @@ export default {
// };
}
if (!isDev) {
config.output.publicPath = './_nuxt/'
config.output.publicPath = './_nuxt/';
}
return config
}
return config;
},
},
loading: {
color: '#13f4ef',
height: '0px',
continuous: true,
duration: 3000
duration: 3000,
},
css: [
'@/assets/style/fonts.css',
@ -241,23 +235,23 @@ export default {
'@mdi/font/css/materialdesignicons.css',
'~/assets/style/style.css',
'~/assets/style.css',
'material-design-icons-iconfont/dist/material-design-icons.css'
'material-design-icons-iconfont/dist/material-design-icons.css',
],
env: {
EE: !!process.env.EE,
NC_API_URL: 'https://nocodb.com'
NC_API_URL: 'https://nocodb.com',
},
pwa: {
workbox: {
/* workbox options */
assetsURLPattern: './_nuxt/',
pagesURLPattern: './'
pagesURLPattern: './',
},
manifest: {
publicPath: './'
}
}
}
publicPath: './',
},
},
};
/**
* @copyright Copyright (c) 2021, Xgene Cloud Ltd
*

Loading…
Cancel
Save