Comments (8)
what's you moduleResolution entry in the tsconfig.json file? Can you try with .default()
suffix on uni?
from unocss.
try adding type module to your package.json or rename vite config to .mjs/.mts
https://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only
from unocss.
尝试将类型模块添加到 package.json 或将 vite 配置重命名为 .mjs/.mts
https://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only
It's configured, but there's still an error
from unocss.
尝试将类型模块添加到 package.json 或将 vite 配置重命名为 .mjs/.mts
https://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only
This error occurs when you change the ts file to mts
from unocss.
tsconfig.json 文件中的 moduleResolution 条目是什么?你可以尝试
.default()
在uni上使用后缀吗?
from unocss.
@dcloudio/*
seems to be only CJS and the plugin doesn't have types:
- https://arethetypeswrong.github.io/?p=%40dcloudio%2Ftypes%403.4.8
- https://arethetypeswrong.github.io/?p=%40dcloudio%2Fvite-plugin-uni%403.0.0-alpha-3000020210521001
from unocss.
add console.log(uni.default || uni)
before export default defineConfig({
and run dev or build script...
from unocss.
add
console.log(uni.default || uni)
beforeexport default defineConfig({
and run dev or build script...
I refer to the dcloudio/uni-app#4815, seems can be solved,Thank you very much for your answer
from unocss.
Related Issues (20)
- Properties with multiple values are not matched against shortcuts.
- [preset-mini] Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'startsWith')
- Slow unocss config loading since v0.59.0 HOT 3
- Support Arbitrary values for responsive
- Add helper comments for extended-colors when previewing.
- `vitest run` hangs until timeout with UnoCSS Astro integration
- transformerDirectives fails to apply in nested CSS HOT 1
- grid HOT 2
- unocss not woking in Vue-cli5.0.8 HOT 2
- How to use use vue deep selector in unocss ?
- The inline style setting failed when I use transformerAttributifyJsx()
- Attributify JSX does not work when attributes are passed as props to SolidJs component
- 在less 中 @apply 非整数值 不能增长解析 HOT 1
- Not all rules get considered (first rule wins?) HOT 7
- Automatically merge `uno.config`s from Nuxt layers
- `content-none` not working HOT 3
- some question HOT 1
- Internal server error: [postcss] /__uno.css:369:47: Unknown word HOT 1
- pnpm add -D @unocss/nuxt bug HOT 1
- At-media rule for lg: and md: prefixes missing closing curly brace on output file when using the CLI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unocss.