From 8c1063001d2ba6b65ea06a9dff028c04445a3afd Mon Sep 17 00:00:00 2001 From: Maxim Khvatalin Date: Thu, 20 Jun 2024 17:07:59 +0300 Subject: [PATCH] chore: setup autoprefixer --- package.json | 1 + pnpm-lock.yaml | 36 ++++++++++++++++++++++++++++++++++++ vite.config.ts | 6 ++++++ 3 files changed, 43 insertions(+) diff --git a/package.json b/package.json index c4e2f61..50bc186 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "@types/node": "^20.14.6", "@vitest/coverage-v8": "^1.6.0", "@wyw-in-js/vite": "^0.5.3", + "autoprefixer": "^10.4.19", "browserslist": "^4.23.1", "browserslist-to-esbuild": "^2.1.1", "eslint": "8.57.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cede95f..ba8fc0c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -71,6 +71,9 @@ importers: '@wyw-in-js/vite': specifier: ^0.5.3 version: 0.5.3(typescript@5.4.5)(vite@5.3.1(@types/node@20.14.6)(terser@5.31.1)) + autoprefixer: + specifier: ^10.4.19 + version: 10.4.19(postcss@8.4.38) browserslist: specifier: ^4.23.1 version: 4.23.1 @@ -1357,6 +1360,13 @@ packages: async@3.2.5: resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} + autoprefixer@10.4.19: + resolution: {integrity: sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==} + engines: {node: ^10 || ^12 || >=14} + hasBin: true + peerDependencies: + postcss: ^8.1.0 + available-typed-arrays@1.0.7: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} @@ -1906,6 +1916,9 @@ packages: for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + fraction.js@4.3.7: + resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} + fs-extra@10.1.0: resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} engines: {node: '>=12'} @@ -2420,6 +2433,10 @@ packages: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} + normalize-range@0.1.2: + resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} + engines: {node: '>=0.10.0'} + npm-run-all@4.1.5: resolution: {integrity: sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==} engines: {node: '>= 4'} @@ -2571,6 +2588,9 @@ packages: resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} engines: {node: '>= 0.4'} + postcss-value-parser@4.2.0: + resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} + postcss@8.4.38: resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==} engines: {node: ^10 || ^12 || >=14} @@ -4630,6 +4650,16 @@ snapshots: async@3.2.5: {} + autoprefixer@10.4.19(postcss@8.4.38): + dependencies: + browserslist: 4.23.1 + caniuse-lite: 1.0.30001636 + fraction.js: 4.3.7 + normalize-range: 0.1.2 + picocolors: 1.0.1 + postcss: 8.4.38 + postcss-value-parser: 4.2.0 + available-typed-arrays@1.0.7: dependencies: possible-typed-array-names: 1.0.0 @@ -5335,6 +5365,8 @@ snapshots: dependencies: is-callable: 1.2.7 + fraction.js@4.3.7: {} + fs-extra@10.1.0: dependencies: graceful-fs: 4.2.11 @@ -5836,6 +5868,8 @@ snapshots: normalize-path@3.0.0: {} + normalize-range@0.1.2: {} + npm-run-all@4.1.5: dependencies: ansi-styles: 3.2.1 @@ -5995,6 +6029,8 @@ snapshots: possible-typed-array-names@1.0.0: {} + postcss-value-parser@4.2.0: {} + postcss@8.4.38: dependencies: nanoid: 3.3.7 diff --git a/vite.config.ts b/vite.config.ts index 2153113..9def3ce 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,5 +1,6 @@ import { fileURLToPath } from 'node:url' import linaria from '@wyw-in-js/vite' +import autoprefixer from 'autoprefixer' import browserslistToEsbuild from 'browserslist-to-esbuild' import Stylis from 'stylis' import { defineConfig } from 'vite' @@ -19,6 +20,11 @@ export default defineConfig((config) => ({ '@test': fileURLToPath(new URL('./test-support', import.meta.url)), }, }, + css: { + postcss: { + plugins: [autoprefixer()], + }, + }, plugins: [ solidPlugin({ hot: config.mode === 'development' }), linaria({