We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如果我需要引入node_modules中的 @aa/plugin插件 /node_modules/@aa/plugin const context = require.context('@aa/plugin'),会默认去到src/@aa/plugin。
export default ({mode})=>{ return defineConfig({ resolve: { alias: [ { find:'@aa', replacement:resolve(__dirname, 'node_modules/@aa'), }, { find:'@', replacement:resolve(__dirname, 'src'), }, ], },` }) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
如果在node_modules中的插件是以@开头,导入就会有问题
如果我需要引入node_modules中的 @aa/plugin插件
/node_modules/@aa/plugin
const context = require.context('@aa/plugin'),会默认去到src/@aa/plugin。
建议先加载vite.config.ts中的resolve.alias,让用户自由配置从哪导入的模块:
欢迎大大们解答
The text was updated successfully, but these errors were encountered: