Comments (7)
Have you actually tried it or are you just assuming? I'm using this module in multiple production apps with ASAR.
from electron-serve.
these were questions not statements ;)
from electron-serve.
All the Node.js fs
methods are patched for ASAR in Electron and works like normal. So there's nothing special needed to support ASAR.
from electron-serve.
I am facing the same problem. When my app is built using electron builder, I get a File Not Found error unless I set asar:false. It appears that when ASAR is built, app.getAppPath is returning an empty string for some strange reason.
from electron-serve.
@siauderman late to the game, what are you setting the directory to?
If you're setting it to the top level like: serve({ directory: '.' })
There's a bug where no path is doesn't serve index.html
for app://-
// filePath = "...Contents/Resources/app.asar"
// so path.extname(filePath) === ".asar" and it serves file not found
if (resolvedPath || !path.extname(filePath) || path.extname(filePath) === '.html') {
from electron-serve.
@siauderman late to the game, what are you setting the directory to?
If you're setting it to the top level like:
serve({ directory: '.' })
There's a bug where no path is doesn't serve
index.html
forapp://-
// filePath = "...Contents/Resources/app.asar" // so path.extname(filePath) === ".asar" and it serves file not found if (resolvedPath || !path.extname(filePath) || path.extname(filePath) === '.html') {
so instead of serve({ directory: '.' })
, what should I be doing?
from electron-serve.
Oh, I think directory: '.'
should work, made a PR that fixes it: #26
You could point your package.json to ibash/electron-serve
in the meantime.
from electron-serve.
Related Issues (20)
- Delayed protocol registration
- Can't serve React static files HOT 1
- Source maps cannot be loaded by Chrome DevTools HOT 2
- app scheme not working on packaged app HOT 3
- Support serving ES2015 modules
- how to handle cors at production mode ?
- Make `directory` default to be relative to the app root?
- Fix tests HOT 1
- Poor documentation. HOT 6
- Error: ERR_FILE_NOT_FOUND (-6) loading 'app://-/' HOT 3
- Create a new BrowserWindow in the Nuxt app.
- Using it with electron builder ? HOT 2
- Implement how to serve two windows HOT 5
- Cookie not working in Prod
- Unclear sentence in readme HOT 2
- Spectron is officially deprecated as of February 1, 2022.
- ERR_CONNECTION_REFUSED when starting node server from sveltekit
- Not correctly served static files HOT 3
- Benefits of using electron-serve in Angular HOT 2
- how to use in vue touer? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-serve.