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

[Bug Report] 编译出来没有样式 #869

Open
cuibty opened this issue Dec 25, 2024 · 5 comments
Open

[Bug Report] 编译出来没有样式 #869

cuibty opened this issue Dec 25, 2024 · 5 comments

Comments

@cuibty
Copy link

cuibty commented Dec 25, 2024

问题出在哪个包

@taroify/core

问题出在哪个平台/设备/浏览器

微信小程序

平台/设备/浏览器

win

你正在使用的 Taroify 版本是多少

0.6.2-alpha.0

描述一下您遇到的问题以及重现步骤

https://taroify.github.io/taroify.com/quickstart/
按照这个步骤安装了taroify,编译出来没有样式。

image

image

如果可能的话,请包含一个代码框的链接与复制的问题

No response

你知道如何解决这个问题吗

No

您是否愿意参与修复这个问题,并创建一个 PR

No

修复这个问题的解决方案

No response

@cuibty cuibty changed the title [Bug Report] [Bug Report] 编译出来没有样式 Dec 25, 2024
@Pilotager
Copy link
Collaborator

Taro 版本,以及使用的什么编译的?

@cuibty
Copy link
Author

cuibty commented Dec 26, 2024

Taro 4.0.8
taro build --type weapp --watch

taro init myapp
? 请选择框架 React
? 是否需要使用 TypeScript ? Yes
? 是否需要编译为 ES5 ? Yes
? 请选择 CSS 预处理器(Sass/Less/Stylus) Sass
? 请选择包管理工具 pnpm
? 请选择编译工具 Vite
? 请选择模板源 Github(最新)
? 请选择模板 默认模板

@Pilotager
Copy link
Collaborator

Taro 4.0.8 taro build --type weapp --watch

taro init myapp ? 请选择框架 React ? 是否需要使用 TypeScript ? Yes ? 是否需要编译为 ES5 ? Yes ? 请选择 CSS 预处理器(Sass/Less/Stylus) Sass ? 请选择包管理工具 pnpm ? 请选择编译工具 Vite ? 请选择模板源 Github(最新) ? 请选择模板 默认模板

OK,我试试

@wuhongdan
Copy link

@cuibty
image
这样试试 我直接引入 也是不行 后面看到这个示例 加上这个样式 编译之后 就有样式了

@ief820
Copy link

ief820 commented Jan 7, 2025

Taro 4.0.8 taro build --type weapp --watch

taro init myapp ? 请选择框架 React ? 是否需要使用 TypeScript ? Yes ? 是否需要编译为 ES5 ? Yes ? 请选择 CSS 预处理器(Sass/Less/Stylus) Sass ? 请选择包管理工具 pnpm ? 请选择编译工具 Vite ? 请选择模板源 Github(最新) ? 请选择模板 默认模板

taro 4.0.8 我也遇到了这个问题, 按照这个重新生成项目,引入taroify, 设置npm i babel-plugin-import -D 后报错了。

node_modules/@babel/core/lib/config/validation/options.js:85
const configError = new _configError.default(error.message, filename);
^

[ConfigError: .presets[0] may only be a two-tuple or three-tuple] {
code: 'PLUGIN_ERROR',
plugin: 'commonjs--resolver',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants