File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ English | [简体中文](./README.zh-cn.md)
2020npm i unplugin-preprocessor-directives
2121```
2222
23+ > [ !NOTE]
24+ > This plugin should be placed ** before** all other plugins in your configuration to ensure preprocessor directives are processed first.
25+
2326<details >
2427<summary >Vite</summary ><br >
2528
@@ -29,7 +32,7 @@ import PreprocessorDirectives from 'unplugin-preprocessor-directives/vite'
2932
3033export default defineConfig ({
3134 plugins: [
32- PreprocessorDirectives ({ /* options */ }),
35+ PreprocessorDirectives ({ /* options */ }), // Should be the first plugin
3336 ],
3437})
3538```
Original file line number Diff line number Diff line change 1010
1111[ English] ( ./README.md ) | 简体中文
1212
13- > [ !IMPORTANT ]
13+ > [ !NOTE ]
1414> 如果你喜欢这个项目,希望你能给这个仓库点一个 star ⭐,你的支持能帮助这个项目加入到 [ unplugin 组织] ( https://github.com/unplugin/.github/issues/5 ) !
1515
1616## 安装
1919npm i unplugin-preprocessor-directives
2020```
2121
22+ > [ !IMPORTANT]
23+ > 此插件应该放在配置中所有其他插件** 之前** ,以确保预处理器指令首先被处理。
24+
2225<details >
2326<summary >Vite</summary ><br >
2427
@@ -28,7 +31,7 @@ import PreprocessorDirectives from 'unplugin-preprocessor-directives/vite'
2831
2932export default defineConfig ({
3033 plugins: [
31- PreprocessorDirectives ({ /* options */ }),
34+ PreprocessorDirectives ({ /* options */ }), // 应该是第一个插件
3235 ],
3336})
3437```
You can’t perform that action at this time.
0 commit comments