unplugin-preprocessor-directives
unplugin-preprocessor-directives copied to clipboard
preprocessor directives for jsx,tsx,js,ts,html,css,vue and more
``` node:internal/modules/esm/resolve:853 throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null); ^ Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'vite' imported from /Volumes/Extra/Code/conditional/node_modules/.pnpm/[email protected]/node_modules/unplugin-preprocessor-directives/dist/chunk-C3KB5XGL.js at packageResolve (node:internal/modules/esm/resolve:853:9) at moduleResolve (node:internal/modules/esm/resolve:910:20) at defaultResolve (node:internal/modules/esm/resolve:1130:11) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12) at...
In this function the sourcemap positions are always returned as position 0. This breaks mapping back to the original source and coverage reporting. https://github.com/KeJunMao/unplugin-preprocessor-directives/blob/667aca04e39db449f4fe533e10f22d1dc7054735/src/core/context/index.ts#L88 ```javascript transformWithMap(code: string, _id: string) {...
In Vue SFC file, with the following code ``` { "tag": "jy-dict", // "data": { "props": { "type": "radio", // 显示类型:radio、单选按钮;checkbox、多选按钮;其他取值为下拉框 "dict": "Common_YesNo", // 字典编码或者字典项列表如:["所属机构", "系统名称", "不显示名称" ] "dataType": "String"...
I am trying to use this great plugin with **vite**. In **typescript**, it works well: ``` // #if DEV console.log('DEV') // #else console.log('else DEV'); // #endif ``` but in **html**,...
1. 修复pre标签whitespace丢失问题 2. 通过测试用例 3. example添加pre展示
I just ran into a race condition of sorts regarding the order of plugins in my vite config. For my entire project I've had my plugins ordered with `react` first...
如下图所示,我是用webpack/rspack的包时依然被有vite的依赖,这是不符合预期效果的,源码内部也确实存在vite的依赖导入  
error: ```bash error Failed to load file with jiti: xxxx/xxxxx/rsbuild.config.ts error Failed to start dev server. error Cannot find module 'vite' ``` The vite framework is required in the src/core/context/index.ts...