-
-
Notifications
You must be signed in to change notification settings - Fork 280
[Announcement] V2.0 beta stability poll #733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think electron-builder should not have Please don't add unnecessary complexity layers. |
To talk to these points:
Another point of feedback that would be useful:
|
@nklayman I found a problem with reloading windows in production. I think it would be nice if To reproduce
FixTo prevent this problem, you could add the following in the main: mainWindow.webContents.on('did-fail-load', () => {
if (process.env.NODE_ENV === 'production') {
mainWindow.loadURL('app://./index.html')
}
}) I added it right above this line and it fixed the problem: if (process.env.WEBPACK_DEV_SERVER_URL) {
... |
@aleksey-hoffman and @rathboma thanks for your suggestions! Regarding
However, you made some valid points regarding complexity and how many apps will want @aleksey-hoffman as for the bug you reported, does this only happen with the 2.0 beta and not the 1.x version? |
@nklayman regarding As for the bug, it emerges from Vue router and present in any "single page application (SPA)". Electron only sees 1 real page - Also, thanks for maintaining and developing this repo, it simplified the development and packaging process for me, I'm building a modern file manager app based on it, which I'm gonna open source on GitHub in about a month. |
@aleksey-hoffman The reason I can't just leave it to be configured in the If you use hash instead of history mode does the bug still occur? You can also use history mode for SPA and hash for electron automatically. I'm glad this plugin was helpful, and what you're building sounds really cool. I've been thinking about adding a showcase of projects built with this plugin and yours would be a great fit once you open source it, give me a ping when you do if you are interested. |
@nklayman hmm, yeah, I had
Though I'm not sure if changin mode is gonna break anything. Doesn't look like it did from the first glance, but I'm not sure yet. Yeah, sure thing, I will let you know when I publish it. I've been working on that file manager app for like the past 2 years, it will have lots of amazing features like:
Wait till you see, it's gonna be really good, it's about 90% done already 🙂 |
@nklayman I finally figured out how to solve the problem where you would get I posted a solution here Since you are trying to make electron-builder more secure by default, and since most devs simply set Perhaps, add something like this in the main: app.on('ready', async () => {
const mediaLoadProtocolName = `${appName}-load-media`
protocol.registerFileProtocol(mediaLoadProtocolName, (request, callback) => {
const url = request.url.replace(`${mediaLoadProtocolName}://`, '')
// Decode URL to prevent errors when loading filenames with UTF-8 chars or chars like "#"
const decodedUrl = decodeURIComponent(url)
try {
return callback(decodedUrl)
}
catch (error) {
console.error(error)
return callback(404)
}
})
... And then add some instructions to the docs on how to use it in a renderer: Renderer | Home.vue<img
:src="getSrc('C:/test.jpg')"
data-path="C:/test.jpg"
> methods: {
getSrc (path) {
return `app-name-load-media://${path}`
}
} |
This new way of configuring What I have understood by now is that the config option doesn't affect my app, just the build process, so if I have it set to |
@skourismanolis The |
@aleksey-hoffman I've created #742 to collect security-related recommendations for a new section in the docs. Can you repost your suggestion there for better tracking? If possible, I'd appreciate a short description of why switching |
So, as long as I don't use the |
Yep, but just beware that you might get errors because of build process changes from the nodeIntegration setting in vue.config.js. |
I've been using the latest Beta versions for some time now, even in production. Hadn't had any issues upgrading from 1.4 and using the latest Electron 8. For testing i prefer Cypress and it's integration into Electron is a different topic, so sadly no feedback on Spectron.. As I am using native modules I have to enable the node integration, but I think it's a good thing to be "more secure" by default. So far no (v2 related) bugs or new issues showed up, so i would consider it stable. As the app is still in beta and pretty new, it only has a limited user audience from around 300 people, but all operating systems (Linux, macOS, Windows) are represented. |
@nklayman Electron v9 is out. Perhaps electron-builder v2 should support it out of the box? Though, keep in mind, they switched the default value of Of course, you could add a temporary override to the
But they will deprecate this override in Electron v11, so maybe developers should do this by themselves, if they want to keep using non-context-aware modules in Electron 9+? |
V2 already uses electron v9 by default, the latest version just hasn't been published yet. |
@nklayman Got any estimate release date yet? 😬 |
Need a bit more clarity on migration. my current testing project uses v1. I installed with simple steps given in It's not clear how this will change plugin v1 to v2? If you can give clear steps how to get started with v2 I think I can test stability out. also according to release I see that there are only two changes, testing flow and disabled |
@Sparkenstein I updated the migration guide with instructions on updating the plugin version, I forgot to add that. I added docs on preload with full instructions as well. |
v2.0 has been promoted to RC and is now the default version! |
@aleksey-hoffman I think loading local resources works just fine using the |
@nklayman It doesn't work for me. When I try to load a media file, e.g.: <img :src="app://E:/file.png"> I get this error:
It's weird that it changes drive letter from I'm using |
@aleksey-hoffman What happens if you use a relative path? For me those worked but absolute paths didn't. |
@nklayman I just put the image file in the app directory and tried loading it with
Is that I don't think I've deleted any default electron-builder functions from the background.js file, it's still registers the protocol scheme and calls the To load files in my app, I'm using the implementation I described here. Maybe that custom protocol is doing something different, I'm not sure. Anyway, I think most Electron apps are using absolute paths to load media because user files are not located in the app directory, so I'm not sure how useful it is to only have the ability to load relative paths. |
Okay, I've done some more research and I found out that using |
@nklayman good to know. By the way, are you planning to add support for Vue 3 when it comes out of the Beta? I tried updating my app to Vue 3 myself by running |
Yes, I'd love for this plugin to support vue 3. I'll take a look at it sometime this week probably. |
I don't know, I'm installing it using vue ui. In my package.json the
reported version is rc5
Il giorno ven 4 dic 2020 alle ore 20:42 Aleksey Hoffman <
[email protected]> ha scritto:
… @realrecordzLab <https://github.com/realrecordzLab> how are you using
2.0.0-rc.5 if the latest version is 2.0.0-rc.4?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#733 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMKZMUWNRP64QZ467JK5W7DSTE3Q7ANCNFSM4MTG6QAA>
.
|
Hello everyone:wave:! I'm getting ready to move the 2.0 beta to RC (release candidate) status as it is long overdue, but I first want to make sure that there aren't any breaking changes requested. If you think that the 2.0 beta is ready for RC then please 👍 this issue. If not, please 👎 and leave a comment explaining why.
Specifically, I'd like feedback on the following major changes:
nodeIntegration
.Thanks for all your feedback!
The text was updated successfully, but these errors were encountered: