client/web: fix Vite CJS deprecation warning (#11288)

Starting in Vite 5, Vite now issues a deprecation warning when using
a CJS-based Vite config file. This commit fixes it by adding the
`"type": "module"` to our package.json to opt our files into ESM module
behaviours.

Fixes #cleanup

Signed-off-by: Ross Zurowski <ross@rosszurowski.com>
pull/11291/head
Ross Zurowski 9 months ago committed by GitHub
parent 69f4b4595a
commit e83e2e881b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -6,6 +6,7 @@
"node": "18.16.1",
"yarn": "1.22.19"
},
"type": "module",
"private": true,
"dependencies": {
"@radix-ui/react-collapsible": "^1.0.3",

@ -1,7 +1,7 @@
const plugin = require("tailwindcss/plugin")
const styles = require("./styles.json")
import plugin from "tailwindcss/plugin"
import styles from "./styles.json"
module.exports = {
const config = {
theme: {
screens: {
sm: "420px",
@ -96,20 +96,22 @@ module.exports = {
plugins: [
plugin(function ({ addVariant }) {
addVariant("state-open", [
'&[data-state="open"]',
'[data-state="open"] &',
"&[data-state=“open”]",
"[data-state=“open”] &",
])
addVariant("state-closed", [
'&[data-state="closed"]',
'[data-state="closed"] &',
"&[data-state=“closed”]",
"[data-state=“closed”] &",
])
addVariant("state-delayed-open", [
'&[data-state="delayed-open"]',
'[data-state="delayed-open"] &',
"&[data-state=“delayed-open”]",
"[data-state=“delayed-open”] &",
])
addVariant("state-active", ['&[data-state="active"]'])
addVariant("state-inactive", ['&[data-state="inactive"]'])
addVariant("state-active", ["&[data-state=“active”]"])
addVariant("state-inactive", ["&[data-state=“inactive”]"])
}),
],
content: ["./src/**/*.html", "./src/**/*.{ts,tsx}", "./index.html"],
}
export default config

Loading…
Cancel
Save