Skip to content
New issue

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

fix: 修复theme-helper引用报错问题 #11273

Merged
merged 3 commits into from
Nov 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/amis-theme-editor-helper/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,16 @@ const pkgs = [];
});
}
});

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果依赖这个,应该是 package.json 的 dependencies 去包含它吧?这样直接打在产出里面会无法复用 style-inject

// 很多项目没装这个,所以style-inject直接打进去
const index = pkgs.indexOf('style-inject');
if (~index) {
pkgs.splice(index, 1);
}

const external = id =>
pkgs.some(pkg => id.startsWith(pkg) || ~id.indexOf(`node_modules/${pkg}`));
const input = ['./src/index.ts'];

export default [
{
input,
Expand Down
Loading