Theo Zhang

Results 3 comments of Theo Zhang

Seems like https://github.com/windicss/vite-plugin-windicss/issues/266#issue-1083126344

I tried these 1. use `import { createRequire } from 'node:module'` 2. replace `require.resolve('pug')` to `createRequire(import.meta.url).resolve('pug')` https://github.com/windicss/vite-plugin-windicss/blob/d5ad27b6e8252dd6aad00b1e0630d8530b60dd85/packages/plugin-utils/src/extractors/helper.ts#L18 3. replace `require('pug')` to `createRequire(import.meta.url)('pug')` https://github.com/windicss/vite-plugin-windicss/blob/d5ad27b6e8252dd6aad00b1e0630d8530b60dd85/packages/plugin-utils/src/extractors/pug.ts#L8 Reference from https://stackoverflow.com/questions/59443525/require-not-working-in-module-type-nodejs-script

想显卡加速,生成三码时可以将机型设置成MacPro7,1