Skip to content

Requiring "solid-js/web" on electron (with nodeIntegration) makes it think I'm on the server #1102

@mauricioszabo

Description

@mauricioszabo

Describe the bug

I want to use SolidJS in an Electron. Using require('solid-js/web').isServer returns true, which means I can't use render and other web-related code.

I can work-around by requiring solid-js/web/dist/web.cjs but seems fragile...

Your Example Website or App

https://github.com/mauricioszabo/solid-electron-error

Steps to Reproduce the Bug or Issue

Inside an electron app with nodeIntegration: true try to require solid-js/web. The contents of isServer is true

Expected behavior

I expect require('solid-js/web') to always require "web" stuff, or at least have something like require('solid-js/browser') that always points to browser, and require('solid-js/server') that always points to server

Screenshots or Videos

No response

Platform

  • OS: Ubuntu 12.10
  • Browser: Electron 12.0

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    downstreamissue related tools that would use Solid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions