Migrate to a monorepo structure (#2909)
This commit is contained in:
27
packages/twenty-front/tsup.config.ts
Normal file
27
packages/twenty-front/tsup.config.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import { defineConfig } from "tsup";
|
||||
import svgr from 'esbuild-plugin-svgr'
|
||||
|
||||
export default defineConfig([
|
||||
{
|
||||
entry: {"index": './tsup.ui.index.tsx'},
|
||||
treeshake: true,
|
||||
minify: true,
|
||||
verbose: true,
|
||||
dts: true,
|
||||
clean: true,
|
||||
outDir: "../docs/src/ui/generated",
|
||||
esbuildPlugins: [svgr({ template })],
|
||||
},
|
||||
]);
|
||||
|
||||
function template(variables, { tpl }) {
|
||||
return tpl`
|
||||
${variables.imports};
|
||||
${variables.interfaces};
|
||||
const ${variables.componentName} = (${variables.props}) => (
|
||||
${variables.jsx}
|
||||
);
|
||||
${variables.exports};
|
||||
export const ReactComponent = ${variables.componentName};
|
||||
`;
|
||||
};
|
||||
Reference in New Issue
Block a user