Skip to content

Commit

Permalink
feat: set post css through vite-config
Browse files Browse the repository at this point in the history
  • Loading branch information
RasenGUY committed Nov 7, 2023
1 parent f270975 commit ddfd840
Show file tree
Hide file tree
Showing 32 changed files with 32 additions and 652 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<!-- <link rel="manifest" href="/site.webmanifest"> -->
<link rel="manifest" href="/site.webmanifest">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Wega. Win together, Own together</title>
<script>
<!-- <script>
// It's best to inline this in `head` to avoid FOUC (flash of unstyled content) when changing pages or themes
if (
localStorage.getItem('color-theme') === 'dark' ||
Expand All @@ -19,7 +19,7 @@
} else {
document.documentElement.classList.remove('dark');
}
</script>
</script> -->
</head>
<body>
<div id="root" style="position: relative; z-index: -10; overflow: hidden"></div>
Expand Down
9 changes: 4 additions & 5 deletions postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/* eslint-disable no-undef */
//
module.exports = {
plugins: [
require('postcss-import'),
require('tailwindcss'),
require('autoprefixer'),
],
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
1 change: 0 additions & 1 deletion src/assets/icons/CopyPasteIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react"
import { SVGProps } from "react"
const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
1 change: 0 additions & 1 deletion src/assets/icons/CrownIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react"
import { SVGProps } from "react"
const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
1 change: 0 additions & 1 deletion src/assets/icons/DownloadIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react"
import { SVGProps } from "react"
const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
1 change: 0 additions & 1 deletion src/assets/icons/SparkleIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react"
import { SVGProps } from "react"
const SparkleIcon = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
1 change: 0 additions & 1 deletion src/assets/icons/TelegramIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react"
import { SVGProps } from "react";

const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
Expand Down
1 change: 0 additions & 1 deletion src/assets/icons/VersusIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react"
import { SVGProps } from "react"
const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
1 change: 0 additions & 1 deletion src/assets/icons/XIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react"
import { SVGProps } from "react"
const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
175 changes: 0 additions & 175 deletions src/assets/images/DiceCardImg1.tsx

This file was deleted.

175 changes: 0 additions & 175 deletions src/assets/images/DiceCardImg2.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/assets/images/GradientBannerSVG.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react"
import { SVGProps } from "react"
const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
84 changes: 0 additions & 84 deletions src/assets/images/Noun392.tsx

This file was deleted.

87 changes: 0 additions & 87 deletions src/assets/images/Noun392L.tsx

This file was deleted.

87 changes: 0 additions & 87 deletions src/assets/images/Noun392R.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/assets/images/OR.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react"
import { SVGProps } from "react"
const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
1 change: 0 additions & 1 deletion src/assets/images/OwnTheYardGraphicMobile.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react"
import { SVGProps } from "react"
const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
5 changes: 0 additions & 5 deletions src/assets/images/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,3 @@ export { default as OrIcon } from './OR';
export { default as USDCIcon } from './usdc';
export { default as USDTIcon } from './usdt';
export { default as MaticIcon } from './matic';
export { default as Noun392 } from './Noun392';
export { default as Noun392R } from './Noun392R';
export { default as Noun392L } from './Noun392L';
export { default as DiceGameCardImg1 } from './DiceCardImg1';
export { default as DiceGameCardImg2 } from './DiceCardImg2';
1 change: 0 additions & 1 deletion src/assets/images/matic.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react"
import { SVGProps } from "react"
const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
1 change: 0 additions & 1 deletion src/assets/images/usdc.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react"
import { SVGProps } from "react"
const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
1 change: 0 additions & 1 deletion src/assets/images/usdt.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react"
import { SVGProps } from "react"
const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
1 change: 0 additions & 1 deletion src/components/Dice/images/DiceFive.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react"
import { SVGProps } from "react"
const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
1 change: 0 additions & 1 deletion src/components/Dice/images/DiceFour.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react"
import { SVGProps } from "react"
const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
1 change: 0 additions & 1 deletion src/components/Dice/images/DiceOne.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react"
import { SVGProps } from "react"
const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
1 change: 0 additions & 1 deletion src/components/Dice/images/DiceSix.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react"
import { SVGProps } from "react"
const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
1 change: 0 additions & 1 deletion src/components/Dice/images/DiceThree.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react"
import { SVGProps } from "react"
const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
1 change: 0 additions & 1 deletion src/components/Dice/images/DiceTwo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from "react"
import { SVGProps } from "react"
const SvgComponent = (props: SVGProps<SVGSVGElement>) => (
<svg
Expand Down
6 changes: 3 additions & 3 deletions src/components/GameCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const DiceGameCard = () => {
className="card-orb"
/>
</GameCardHeader>
<GameCardBody className="position-inherit">
<GameCardBody>
<GameCardTitle>Dice</GameCardTitle>
<GameCardDescription>
Roll the dice, the player with the highest number wins.
Expand Down Expand Up @@ -118,8 +118,8 @@ export const CoinFlipGameCard = () => {

return (
<GameCardContainer onMouseEnter={() => setHovering(true)} onMouseLeave={() => setHovering(false)} >
<GameCardHeader className="flex justify-center items-center relative">
<CoinFlipIcon width="83.002px" height="110.513px" ref={iconRef} className="translate-y-[1rem]"/>
<GameCardHeader tw="flex justify-center items-center relative">
<CoinFlipIcon width="83.002px" height="110.513px" ref={iconRef} tw="translate-y-[1rem]"/>
<GameCardOrb
ref={orbRef}
width='269px'
Expand Down
1 change: 0 additions & 1 deletion src/containers/LandingPage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import { Helmet } from 'react-helmet-async'
import LandingPageHeroSection from '../../components/LandingPageHeroSection';
import LandingPageHeroSectionMobile from '../../components/LandingPageHeroSectionMobile';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/NavigationMobile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const NavigationMobile = () => {
<div tw="container dark:text-blanc flex items-center relative z-[756]">
<NavigationLinksContainer tw="box-border flex w-full gap-x-[30px]">
<BrandContainer tw="mb-[4px] py-[20px]">
<Brand tw="font-[32px] font-semibold" ><Link to="/">Wega<span className="font-[32px] dark:text-oranjo">.</span></Link></Brand>
<Brand tw="font-[32px] font-semibold" ><Link to="/">Wega<span tw="font-[32px] dark:text-oranjo">.</span></Link></Brand>
</BrandContainer>
</NavigationLinksContainer>
<div tw="relative flex items-end w-[22px] z-[756]" onClick={toggleNav} ><HamburgerIcon /></div>
Expand Down
12 changes: 9 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"lib": ["DOM", "DOM.Iterable", "ES2020", "ESNext"],
"module": "ESNext",
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "bundler",
"moduleResolution": "node",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve",
"jsx": "react-jsx",
"allowJs": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,



/* Linting */
"strict": true,
Expand Down
16 changes: 12 additions & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react'

import autoprefixer from 'autoprefixer';
// https://vitejs.dev/config/
export default ({ mode }) => {

process.env = { ...process.env, ...loadEnv(mode, process.cwd())};
return defineConfig({

optimizeDeps: {
esbuildOptions: {
target: 'es2020',
target: 'esnext',
},
},
esbuild: {
// https://github.com/vitejs/vite/issues/8644#issuecomment-1159308803
logOverride: { 'this-is-undefined-in-esm': 'silent' },
},
css: {
postcss: {
plugins: [autoprefixer()],
},
},
plugins: [
react({
babel: {
plugins: ['babel-plugin-macros', 'babel-plugin-styled-components']
plugins: [
'babel-plugin-macros',
'babel-plugin-styled-components'
]
}
}),

],
})

Expand Down

0 comments on commit ddfd840

Please sign in to comment.