You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I have project(called A) built with remix/vite, and it include my other library(called B) built based on storybook and vite. Both A and B have installed @tabler/icons-react as dev dependency.
When I build library B itself, the tabler icons are doing okay, not included in the build. But when I build the project A, the tabler icons in B are all transforming and packed into build/client/assets/B.js. It occupied a huge bundle size. I'm not sure if this is related to treeshaking or some configs? I have attached both vite configs below. Please anyone help me on this! Thanks in advance!
Project A vite config:
import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import mdx from "@mdx-js/rollup";
import remarkFrontmatter from "remark-frontmatter";
import remarkMdxFrontmatter from "remark-mdx-frontmatter";
import { visualizer } from "rollup-plugin-visualizer";
export default defineConfig({
ssr: {
noExternal: ["pdfmake/build/vfs_fonts" /* , "dc" */],
},
plugins: [
mdx({
remarkPlugins: [remarkFrontmatter, remarkMdxFrontmatter],
}),
remix(),
tsconfigPaths(),
visualizer({
open: true,
gzipSize: true,
template: "treemap",
}),
],
});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I have project(called A) built with remix/vite, and it include my other library(called B) built based on storybook and vite. Both A and B have installed @tabler/icons-react as dev dependency.
When I build library B itself, the tabler icons are doing okay, not included in the build. But when I build the project A, the tabler icons in B are all transforming and packed into build/client/assets/B.js. It occupied a huge bundle size. I'm not sure if this is related to treeshaking or some configs? I have attached both vite configs below. Please anyone help me on this! Thanks in advance!
Project A vite config:
Library B vite config:
Beta Was this translation helpful? Give feedback.
All reactions