formaat-design / reshaped

Community repository for storing examples, reporting issues and tracking roadmap
https://reshaped.so
110 stars 3 forks source link

[Bug] setting up reshaped package in latest version Vite installation faild #165

Closed charles0122 closed 1 year ago

charles0122 commented 1 year ago

document : https://reshaped.so/content/docs/getting-started/integrations/vite select react and ts starter Failed to start properly !! no style !!!

guess cause

  1. reshaped don't work in bundler mode

note: postcss not work too

blvdmitry commented 1 year ago

Does this also happen if you try installing our Vite starter? https://github.com/formaat-design/reshaped/tree/master/examples/starter-vite

charles0122 commented 1 year ago

Yes, I have seen it, but I have seen the VITE and TS versions of this repository, I still hope to be able to use newer versions, the documentation is also using the latest version of VITE, or you can modify the document to specify a version, so that people after use will not encounter such setbacks, thank you, if you feel that my idea is not right, you can not consider, or even close this issue, of course you want to deal with it, please let me know. The style I mentioned probably didn't work because I used the theme incorrectly. 是的,我有看到,但是我看过这个仓库的vite和ts版本,我还是希望能够使用新一些的版本,文档中也是使用最新版本的vite,或者可以修改文档指定一个版本,这样之后的人使用不会遇到这样的挫折,谢谢,如果你觉得我的想法不对,可以不考虑,甚至关闭这个issue,当然你想处理它,也请告知我。 我提到的样式不起作用的或许是因为我错误的使用theme。

blvdmitry commented 1 year ago

Let's keep it open, so I can update the version of Vite in the starter repo to the latest one so you can use it as a reference

blvdmitry commented 1 year ago

Just tried it out with the all packages updated and it seems to work fine. I will push it to the repo once I'm back from vacation since v2.2 will be bringing some recommended setup changes (nothing breaking), which I can't have pushed yet. Releasing it on 28th of August

image
blvdmitry commented 1 year ago

Also these are configs I'm using:

// vit.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

export default defineConfig({
  plugins: [react()],
});

// postcss.config.cjs
const { config } = require("reshaped/config/postcss");

module.exports = config;

Works in both, dev and build modes