Skip to content

Conversation

@jkone27
Copy link
Collaborator

@jkone27 jkone27 commented Mar 25, 2025

add a hello world vanilla js program referencing the library as npm dependency directly

  • cannot use file: .. (points to root package.json) as it creates circular deps
  • uses .tgz archive to reference the pre packaged lib

can be run as bun i and bun run dev similar to sample-project

image

@nojaf
Copy link
Member

nojaf commented Mar 25, 2025

This feels very similar to the other sample. I would be fine with replacing it with this one. Additionally, users aren't being directed to this sample if that is the goal. You haven't tested this in CI and didn't add actual tests to Vitest, so what is the purpose here?

"devDependencies": {
"vite": "^6.2.0",
"vite-plugin-fable": "file:..",
"vite-plugin-fable": "./lib/latest.tgz",
Copy link
Member

Choose a reason for hiding this comment

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

tgz seems weird, can't you use ../?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i tried but i had issues with recursion as it seems to install the whole univers in node_modules/vite-plugin-fable/...../node_modules/vite-plugin-fable.... and adding a bunch fo files even though they are not mentioned in files in root package.json, so i found this solution to be a bit better/slimmer and not having that recursive issue

Copy link
Member

Choose a reason for hiding this comment

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

I see, yeah that is probably why I went with import plugin from "../index.js" instead.


<ItemGroup>
<PackageReference Include="Fable.Browser.Dom" Version="2.14.0" />
<PackageReference Include="Fable.Core" Version="4.3.0" />
Copy link
Collaborator Author

@jkone27 jkone27 Mar 27, 2025

Choose a reason for hiding this comment

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

this is a regular fable / vite counter app with vanillajs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants