Skip to content
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

I want to bundle Selenium but WebPack can't find it(?) #3604

Open
SwedFred opened this issue Apr 23, 2024 · 0 comments
Open

I want to bundle Selenium but WebPack can't find it(?) #3604

SwedFred opened this issue Apr 23, 2024 · 0 comments
Labels

Comments

@SwedFred
Copy link

I built an electron app last year but because I really like working with React I migrated the project to this boilerplate. Gradually I made changes to the project only to find out that WebPack can't package it. The reason seems to be because I use Selenium by a reference in an external script that is called by my app through an instance of Mocha.

The error I get is:
ERROR in dll renderer renderer[14]
Module not found: Error: Can't resolve 'selenium' in [project path]

I don't have any experience configuring WebPack but I tried following all kind of guides that I could find and added:

          new webpack.ProvidePlugin({
            'selenium-webdriver': 'selenium-webdriver',
            'selenium': 'selenium',
            'selenium-webdriver/chrome': 'selenium-webdriver/chrome',
            'chromedriver':'chromedriver'
          }),

to the plugins section of webpack.config.renderer.prod.ts. I also tried to add dummy references to selenium in main.ts, but that didn't work either.

I'm kind of desperate to either get help to get WebPack to build with Selenium, or if there's a way to transpile a react project into vanilla JS so I don't have to re-write my project to get it to work with vanilla electron. Or if there's a way to build it with electron forge instead of WebPack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant