Cannot build esbuild bundle
See original GitHub issueDescribe the bug It appears the path used in
<script data-entry-point type="module" src="./App.js"></script>
Needs to exist on disk for esbuild to find it.
To Reproduce
I have a config like this:
{
"$schema": "https://raw.githubusercontent.com/AngelMunoz/Perla/v0.22.1/perla.schema.json",
"index": "./index.html",
"fable": {
"project": "./src/MyProject.App/MyProject.App.fsproj",
"extension": ".js",
"outDir": "./out"
},
"devServer": {
"port": 8900,
"mountDirectories": {
"./out": "",
"./out/fable_modules": "/fable_modules",
"./images": "/images"
},
"useSSL": true,
"watchConfig": {
"directories": [ "./out", "./images" ]
},
"liveReload": true
}
}
I’m mounting the physical out
folder on the root and then i"m pointing my src="./App.js"
of my data-entry-point
to it.
Expected behaviour
It would be nice if there was some validation of whether the file passed to esbuild exists.
If it doesn’t, it could look into the physical folder (out
in my case) that is mapped to the root of the dev server.
Desktop (please complete the following information):
- OS: Windows
Additional context Add any other context about the problem here.
Mounting "./out": "",
doesn’t appear to include any subfolders. This might be a different bug or expected behaviour, I’m not sure.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
esbuild bundle incorrectly · Issue #1488
From the discussion above and the linked issues, it sounds like the problem is the Yarn PnP plugin causes the package's main field...
Read more >AWS SAM - Esbuild Failed: cannot find esbuild
I was encountering this issue as well. I put sam build as an npm script so that it looks at your project's node_modules...
Read more >Getting Started
First, install the react and react-dom packages: npm install react react-dom. Then create a file called app.jsx containing the following code:
Read more >Serverless Esbuild
serverless-esbuild. Serverless plugin for zero-config JavaScript and TypeScript code bundling using promising fast & furious esbuild bundler and minifier.
Read more >@nx/esbuild:esbuild | Nx
Bundle a package for different platforms. Note: declaration (*.d.ts) file are not currently generated. Options can be configured in project.json when defining ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m on
0.22.1
Thanks for the quick response.
The new version has been released! Once again thanks for this contribution
https://www.nuget.org/packages/Perla/0.23.0 https://github.com/AngelMunoz/Perla/releases/tag/v0.23.0