diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..a860310 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +node_modules/** diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..b588029 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + semi: false, + singleQuote: true, + plugins: [ + "prettier-plugin-tailwindcss" + ] +} diff --git a/tailwind.config.js b/tailwind.config.js index 821456b..c0315dc 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -2,11 +2,10 @@ export default { content: [ './templates/**/*.twig', - './src/**/*.{js,jsx,ts,tsx,svg}', + './src/**/*.{js,jsx,ts,tsx,svg}' ], theme: { - extend: {}, + extend: {} }, - plugins: [], + plugins: [] } - diff --git a/vite.config.js b/vite.config.js index 0ce57b8..5bc3cf5 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,29 +1,29 @@ -import {defineConfig, loadEnv } from 'vite' +import { defineConfig, loadEnv } from 'vite' // Match ports in .ddev/config.yaml -> web_extra_exposed_ports -const HTTP_PORT = 3000; -const HTTPS_PORT = 3001; +const HTTP_PORT = 3000 +const HTTPS_PORT = 3001 -export default defineConfig(({command, mode}) => { - const env = loadEnv(mode, process.cwd(), ''); - const originPort = env.PRIMARY_SITE_URL.startsWith('https') ? HTTPS_PORT : HTTP_PORT; +export default defineConfig(({ command, mode }) => { + const env = loadEnv(mode, process.cwd(), '') + const originPort = env.PRIMARY_SITE_URL.startsWith('https') ? HTTPS_PORT : HTTP_PORT - return { - base: command === 'serve' ? '' : '/dist/', - build: { - manifest: true, - outDir: './web/dist/', - rollupOptions: { - input: { - app: 'src/js/app.js', - } - }, - }, - server: { - host: '0.0.0.0', - strictPort: true, - port: HTTP_PORT, - origin: env.PRIMARY_SITE_URL + ':' + originPort, + return { + base: command === 'serve' ? '' : '/dist/', + build: { + manifest: true, + outDir: './web/dist/', + rollupOptions: { + input: { + app: 'src/js/app.js' } - }; -}); \ No newline at end of file + } + }, + server: { + host: '0.0.0.0', + strictPort: true, + port: HTTP_PORT, + origin: env.PRIMARY_SITE_URL + ':' + originPort + } + } +})