Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Works for me (Vue3, TW3, Vite), but with small changes #4

Open
kalnode opened this issue Jan 1, 2023 · 0 comments
Open

Works for me (Vue3, TW3, Vite), but with small changes #4

kalnode opened this issue Jan 1, 2023 · 0 comments

Comments

@kalnode
Copy link

kalnode commented Jan 1, 2023

Hey, this plugin works for me (Vue3, Tailwind3, Vite...).

Thx for the work. I appreciate it's easier than the other rem-to-px plugins out there.

However the following were hiccups:

1. The Github readme still seems to have an error?

Wrong:
npm install --save-dev postcss postcss-rem-to-px

Correct:
npm install --save-dev postcss @thedutchcoder/postcss-rem-to-px

2. My postcss.config.js is different:

I don't use:
require('@thedutchcoder/postcss-rem-to-px')

This works:

module.exports = {
    plugins: {
        tailwindcss: {},
        autoprefixer: {},
        '@thedutchcoder/postcss-rem-to-px': {}
    }
}

Finally, if it helps, my package.json, for reference:

{
  "name": "my-cool-chrome-extension",
  "version": "1.0.0",
  "private": true,
  "scripts": {
    "dev": "vite",
    "build": "vite build && npx tailwindcss -i ./src/assets/main.css -o ./dist/assets/main.css",
    "preview": "vite preview",
    "test:unit": "vitest --environment jsdom --root src/"
  },
  "dependencies": {
    "vue": "^3.2.45"
  },
  "devDependencies": {
    "@thedutchcoder/postcss-rem-to-px": "^0.0.2",
    "@vitejs/plugin-vue": "^4.0.0",
    "@vue/test-utils": "^2.2.6",
    "autoprefixer": "^10.4.13",
    "jsdom": "^20.0.3",
    "postcss": "^8.4.20",
    "tailwindcss": "^3.2.4",
    "vite": "^4.0.0",
    "vite-plugin-chrome-extension": "^0.0.7",
    "vitest": "^0.25.6"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant