tommy-lettieri / resume-template

This project is going to be an npm module that builds a resume website and resume pdf. You give it the data and everything else is within the module.
MIT License
0 stars 0 forks source link

Switch back to using rollup rather than just a typescript build #1

Open tommy-lettieri opened 3 years ago

tommy-lettieri commented 3 years ago

After adding ReactMarkdown i started getting warnings when "rolling up" the project, this was the warning:

luigi@luigi-virtualbox:~/workspace/resume-template$ npm run build

> @z87/resume-template@0.0.0-1 build /home/luigi/workspace/resume-template
> rollup -c

./src/index.ts → dist/index.js...
(!) Circular dependencies
node_modules/remark-rehype/node_modules/mdast-util-to-hast/lib/one.js -> node_modules/remark-rehype/node_modules/mdast-util-to-hast/lib/all.js -> node_modules/remark-rehype/node_modules/mdast-util-to-hast/lib/one.js
node_modules/remark-rehype/node_modules/mdast-util-to-hast/lib/one.js -> node_modules/remark-rehype/node_modules/mdast-util-to-hast/lib/all.js -> /home/luigi/workspace/resume-template/node_modules/remark-rehype/node_modules/mdast-util-to-hast/lib/one.js?commonjs-proxy -> node_modules/remark-rehype/node_modules/mdast-util-to-hast/lib/one.js

It was mentioned in this comment here recently https://github.com/syntax-tree/unist-util-select/issues/9#issuecomment-833899583

I'll come back to it but for right now I'm going to try to just build it with typescript alone

tommy-lettieri commented 3 years ago

This affects version 0.0.0-2 This works fine in storyboard but on the consumer once the ReactMarkdown loads it crashes

To see the warning just run

npm run build-rollup
tommy-lettieri commented 3 years ago

Since some work has been done I reconfirmed

Changing GenericCard.tsx as follows:

// Comment out ReactMarkdown import
// import ReactMarkdown from 'react-markdown';
// Make a dummy component to replace it
const ReactMarkdown = ({ children }: any) => <div>{ children }</div>;

Makes the cyclic dependency go away

Currently on version v0.1.0

tommy-lettieri commented 3 years ago

This issue is more precisely the issue I'm facing https://github.com/remarkjs/remark-rehype/issues/19