Comments (14)
@antfu @Simon-He95 I was able to reproduce the issue. Please check https://github.com/tobiasdalhof/unocss-issue-3733/
VSCode slows down when I open my laravel routes file. It contains a fair amount of square brackets, which is probably causing the issue
Regular expression was recently changed in #3712
Thank you very much for providing a particularly detailed reproduction demo.
from unocss.
@Simon-He95 Can you help to take a look? Thank you
from unocss.
Probably caused by #3728
from unocss.
Probably caused by #3728
hi, @tobiasdalhof can you provide a reproduced demo
from unocss.
Hey @Simon-He95,
I'm unable to whip up a demo for you right now, but here are some additional details: I've got a monorepo using pnpm. Inside, I've got a bunch of frontends built with Vite, and they all share a single unocss.config.ts
file.
Here's what my repo structure looks like:
๐ /backend
๐ /frontend-1
๐ package.json
๐ vite.config.ts
๐ /frontend-2
๐ package.json
๐ vite.config.ts
๐ /frontend-3
๐ package.json
๐ vite.config.ts
๐ package.json
๐ unocss.config.ts
And here's a snippet from a vite.config.ts
file as an example:
import { resolve } from 'node:path'
import { defineConfig } from 'vite'
import UnoCSS from 'unocss/vite'
export default defineConfig({
plugins: [
UnoCSS(resolve(__dirname, '../unocss.config.ts')),
],
})
Let me know if you need more info or if there's anything else I can assist you with.
from unocss.
@tobiasdalhof,
If possible, please provide a link to the smallest reproduction warehouse so that I can better troubleshoot, thx~
from unocss.
I was able to solve the issue by adding a unocss.config.ts
to each package. My structure now looks like this:
๐ /backend
๐ /frontend-1
๐ package.json
๐ unocss.config.ts
๐ vite.config.ts
๐ /frontend-2
๐ package.json
๐ unocss.config.ts
๐ vite.config.ts
๐ /frontend-3
๐ package.json
๐ unocss.config.ts
๐ vite.config.ts
๐ /shared
๐ package.json
๐ unocss.config.ts
๐ package.json
Helper function in /shared/unocss.config.ts
to create UnoCSS UserConfig
:
import type { UserConfig } from 'unocss'
export function createConfig(): UserConfig {
return {
// ...
}
}
from unocss.
@tobiasdalhof Can you help me test whether this version of the plugin can solve this problem? Please disable unocss and use this test version unocss-test
from unocss.
@tobiasdalhof Can you help me test whether this version of the plugin can solve this problem? Please disable unocss and use this test version unocss-test
@Simon-He95 Thanks for looking into it. The issue still persists
from unocss.
@tobiasdalhof Can you help me test whether this version of the plugin can solve this problem? Please disable unocss and use this test version unocss-test
@Simon-He95 Thanks for looking into it. The issue still persists
I think the best way is for you to provide a repo that reproduces the problem you mentioned so that I can track it.
from unocss.
We temporarily closed this due to the lack of enough information. We could not identify whether it was a bug or a userland misconfiguration with the given info.
Please provide a minimal reproduction to reopen the issue.
Thanks.
from unocss.
@antfu @Simon-He95 I was able to reproduce the issue. Please check https://github.com/tobiasdalhof/unocss-issue-3733/
VSCode slows down when I open my laravel routes file. It contains a fair amount of square brackets, which is probably causing the issue
Regular expression was recently changed in #3712
from unocss.
Hi, I have the same issue with this problem.
the test file is:
https://github.com/tobiasdalhof/unocss-issue-3733/blob/main/test.php
with
Route::get('/some-route', [SomeController::class, 'someMethod']);
Route::get('/some-route', [SomeController::class, 'someMethod']);
Route::get('/some-route', [SomeController::class, 'someMethod']);
...
and my api.php
for laravel router is:
Route::get('test', 'TestController@index');
Route::get('test', 'TestController@index');
Route::get('test', 'TestController@index');
I clone https://github.com/tobiasdalhof/unocss-issue-3733/
this repo
and it still happend on unocss 0.59.4 vscode extension
from unocss.
Hi, I have the same issue with this problem.
the test file is:
https://github.com/tobiasdalhof/unocss-issue-3733/blob/main/test.php
with
Route::get('/some-route', [SomeController::class, 'someMethod']); Route::get('/some-route', [SomeController::class, 'someMethod']); Route::get('/some-route', [SomeController::class, 'someMethod']); ...
and my
api.php
for laravel router is:I clone `https://github.com/tobiasdalhof/unocss-issue-3733/` this repoRoute::get('test', 'TestController@index'); Route::get('test', 'TestController@index'); Route::get('test', 'TestController@index');
and it still happend on unocss 0.59.4 vscode extension
0.59.4 did not merge this pr๐
from unocss.
Related Issues (20)
- Named Group Data Selectors Not Working
- ๅจuniapp x้กน็ฎไธญไฝฟ็จunocssๆฅ้ HOT 1
- proposal: support dynamic layer (and layer order?) in rules HOT 11
- ๆ ๆณไฟๅญๆไปถ๏ผunocssไผผไน้ปๅกไบ HOT 1
- bug(extension): unocss vscode extension hangs when using tsconfig paths imports in config file
- @unocss/cli will exit when encountering text-shadow HOT 2
- Mode that allows importing all styles per project, inlined HOT 3
- uno.config pipeline includes ignores JS from node_modules even with a correct filter in place
- Is there a plan to support rsbuild? HOT 2
- `createLocalFontProcessor` does not store the actual web font files in `dist` during the initial build.
- fetch & autoinstall fonts from `fontsource` HOT 5
- @unocss/preset-icons does not support class names with capital letters HOT 2
- unocss cant transform less variable HOT 3
- Flat multiple font vendors configuration
- Failed to load from `vite.config.ts` after upgrading to latest versions of UnoCSS
- unocss inspector isn't launched on astro project HOT 1
- runtime does not work correctly with arbitrary selectors
- `svelte-scoped` always parses `theme()` HOT 4
- transformerDirectives in preflight not applied on Astro build
- class names in typescript file does not bundled on SvelteKit production build
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.