Skip to content
Merged
Changes from all commits
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
5 changes: 4 additions & 1 deletion packages/eagle/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import mergeScss from "./tools/merge-linaria-scss";
import antdLessPlugin from "./tools/rollup-plugin-antd-less";

const projectRootDir = path.resolve(__dirname);
const eagleVersionSlug = JSON.parse(
fs.readFileSync(path.join(__dirname, "package.json"), "utf-8"),
).version.replace(/[^a-zA-Z0-9]+/g, "_");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

这个 replace 主要是为了兼容性考虑?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

是的


const config = defineConfig([
// bundle components & styles
Expand Down Expand Up @@ -57,7 +60,7 @@ const config = defineConfig([
linaria.default({
sourceMap: false,
preprocessor: "none",
classNameSlug: (hash, title) => `E_${hash}`,
classNameSlug: (hash) => `E_${eagleVersionSlug}_${hash}`,
}),
mergeScss({
include: ["src/**/*.scss", "src/**/*.sass", "src/**/*.css"],
Expand Down
Loading