123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335 |
- import languages from "./languages"
- require("dotenv").config()
- export const options = {
- name: "Hoppscotch",
- shortDescription: "Open source API development ecosystem",
- description:
- "Helps you create requests faster, saving precious time on development.",
- keywords:
- "hoppscotch, hopp scotch, hoppscotch online, hoppscotch app, postwoman, postwoman chrome, postwoman online, postwoman for mac, postwoman app, postwoman for windows, postwoman google chrome, postwoman chrome app, get postwoman, postwoman web, postwoman android, postwoman app for chrome, postwoman mobile app, postwoman web app, api, request, testing, tool, rest, websocket, sse, graphql, socketio",
- loading: {
- color: "var(--accent-color)",
- background: "var(--primary-color)",
- },
- app: {
- background: "#202124",
- },
- social: {
- twitter: "@hoppscotch_io",
- },
- }
- export default {
-
- ssr: false,
-
- target: "static",
-
- server: {
- host: "0.0.0.0",
- },
-
- head: {
- meta: [
- {
- name: "keywords",
- content: options.keywords,
- },
- {
- name: "X-UA-Compatible",
- content: "IE=edge, chrome=1",
- },
- {
- itemprop: "name",
- content: `${options.name} • ${options.shortDescription}`,
- },
- {
- itemprop: "description",
- content: options.description,
- },
- {
- itemprop: "image",
- content: `${process.env.BASE_URL}/banner.png`,
- },
-
- {
- name: "application-name",
- content: options.name,
- },
-
- {
- name: "msapplication-TileImage",
- content: `/icon.png`,
- },
- {
- name: "msapplication-TileColor",
- content: options.app.background,
- },
- {
- name: "msapplication-tap-highlight",
- content: "no",
- },
- ],
- },
-
- loading: {
- color: options.loading.color,
- continuous: true,
- },
-
- loadingIndicator: {
- name: "pulse",
- color: options.loading.color,
- background: options.loading.background,
- },
-
- css: ["~/assets/scss/styles.scss", "~/assets/scss/themes.scss"],
-
- plugins: [
- "~/plugins/v-tippy",
- "~/plugins/v-focus",
- "~/plugins/v-textarea",
- "~/plugins/vue-apollo",
- "~/plugins/init-fb.ts",
- "~/plugins/crisp",
- { src: "~/plugins/web-worker", ssr: false },
- ],
-
- components: true,
-
- buildModules: [
-
- "@nuxtjs/pwa",
-
- "@nuxtjs/stylelint-module",
-
- "@nuxtjs/eslint-module",
-
- "@nuxtjs/google-analytics",
-
- "@nuxtjs/gtm",
-
- "nuxt-windicss",
-
- "@nuxtjs/color-mode",
-
- "@nuxtjs/svg",
-
- "@nuxtjs/google-fonts",
-
- ["@nuxt/typescript-build", { typeCheck: false }],
-
- "@nuxtjs/dotenv",
-
- "@nuxtjs/composition-api/module",
- "~/modules/emit-volar-types.ts",
- ],
-
- modules: [
-
- "@nuxtjs/axios",
-
- "@nuxtjs/toast",
-
- "@nuxtjs/i18n",
-
- "@nuxtjs/robots",
-
- "@nuxtjs/sitemap",
- ],
-
- pwa: {
- meta: {
- name: `${options.name} - ${options.shortDescription}`,
- description: options.description,
- ogHost: process.env.BASE_URL,
- ogImage: `${process.env.BASE_URL}/banner.png`,
- twitterCard: "summary_large_image",
- twitterSite: options.social.twitter,
- twitterCreator: options.social.twitter,
- theme_color: options.app.background,
- },
- manifest: {
- name: options.name,
- short_name: options.name,
- description: options.shortDescription,
- start_url: "/?source=pwa",
- background_color: options.app.background,
- },
- },
-
- eslint: {
- fix: true,
- emitWarning: true,
- quiet: true,
- },
-
- toast: {
- position: "bottom-center",
- duration: 3000,
- keepOnHover: true,
-
- },
-
- googleAnalytics: {
- id: process.env.GA_ID,
- },
-
- gtm: {
- id: process.env.GTM_ID,
- },
-
- sitemap: {
- hostname: process.env.BASE_URL,
- },
-
- robots: {
- UserAgent: "*",
- Disallow: "",
- Allow: "/",
- Sitemap: `${process.env.BASE_URL}/sitemap.xml`,
- },
-
- googleFonts: {
- display: "block",
- families: {
- Inter: [400, 500, 600, 700, 800],
- "Material+Icons": true,
- "Roboto+Mono": [400, 500],
- },
- },
-
- i18n: {
- locales: languages,
- defaultLocale: "en",
- vueI18n: {
- fallbackLocale: "en",
- },
- lazy: true,
- langDir: "locales/",
- detectBrowserLanguage: {
- alwaysRedirect: true,
- fallbackLocale: "en",
- },
- baseUrl: process.env.BASE_URL,
- },
-
- colorMode: {
- classSuffix: "",
- },
-
- build: {
-
- extend(config, { isDev, isClient }) {
-
- if (isDev) {
- config.mode = "development"
- }
- config.node = {
- fs: "empty",
- }
- if (isClient) {
- config.module.rules.unshift({
- test: /\.worker\.(c|m)?js$/i,
- use: { loader: "worker-loader" },
- exclude: /(node_modules)/,
- })
- config.module.rules.push({
- test: /\.md$/i,
- use: { loader: "raw-loader" },
- exclude: /(node_modules)/,
- })
- config.module.rules.push({
- test: /\.geojson$/i,
- use: { loader: "json-loader" },
- exclude: /(node_modules)/,
- })
- config.module.rules.push({
- test: /\.mjs$/,
- include: /node_modules/,
- type: "javascript/auto",
- })
- config.module.rules.push({
- test: /\.js$/,
- include: /(node_modules)/,
- exclude: /(node_modules)\/(@firebase)/,
- loader: "babel-loader",
- options: {
- plugins: [
- "@babel/plugin-proposal-class-properties",
- "@babel/plugin-proposal-nullish-coalescing-operator",
- "@babel/plugin-proposal-optional-chaining",
- ],
- },
- })
- }
- },
- parallel: true,
- cache: true,
-
- terser: {
- terserOptions: {
-
- compress: {
- pure_funcs: ["console.log", "console.debug", "console.warn"],
- },
- },
- },
- },
-
- generate: {
- fallback: true,
- },
-
- env: {
- GA_ID: process.env.GA_ID,
- GTM_ID: process.env.GTM_ID,
- API_KEY: process.env.API_KEY,
- AUTH_DOMAIN: process.env.AUTH_DOMAIN,
- DATABASE_URL: process.env.DATABASE_URL,
- PROJECT_ID: process.env.PROJECT_ID,
- STORAGE_BUCKET: process.env.STORAGE_BUCKET,
- MESSAGING_SENDER_ID: process.env.MESSAGING_SENDER_ID,
- APP_ID: process.env.APP_ID,
- MEASUREMENT_ID: process.env.MEASUREMENT_ID,
- BASE_URL: process.env.BASE_URL,
- },
-
- router: {
- linkActiveClass: "active-link",
- linkExactActiveClass: "exact-active-link",
- },
- }
|