Skip to content

Commit

Permalink
Bring back Firefox runner
Browse files Browse the repository at this point in the history
  • Loading branch information
cezaraugusto committed Jul 23, 2024
1 parent 441eb2a commit 07dc078
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
29 changes: 22 additions & 7 deletions programs/develop/plugin-browsers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'path'
import {type Compiler} from 'webpack'
import {type PluginInterface} from './types'
import {RunChromiumPlugin} from './run-chromium'
// import { RunFirefoxPlugin } from './run-firefox';
import RunFirefoxPlugin from 'webpack-run-firefox-addon'

/**
* RunChromiumPlugin works by creating a WebSockets server
Expand Down Expand Up @@ -79,12 +79,27 @@ export class BrowsersPlugin {
break
}

// case 'edge':
// new RunChromiumPlugin({ ...config, browser: 'edge' }).apply(compiler);
// break;
// case 'firefox':
// new RunFirefoxPlugin({...config, browser: 'firefox'}).apply(compiler);
// break;
case 'edge':
new RunChromiumPlugin({...config, browser: 'edge'}).apply(compiler)
break

case 'firefox':
// TODO: Use updated Firefox plugin
new RunFirefoxPlugin({
port: 8002,
manifestPath: path.join(this.extension[0], 'manifest.json'),
// The final folder where the extension manifest file is located.
// This is used to load the extension into the browser.
extensionPath: path.join(this.extension[0], 'dist', this.browser),
autoReload: true,
userDataDir: this.getProfilePath(
compiler,
'firefox',
this.userDataDir || this.profile
),
stats: true
}).apply(compiler)
break
default: {
new RunChromiumPlugin({...config, browser: 'chrome'}).apply(compiler)
break
Expand Down
2 changes: 1 addition & 1 deletion programs/develop/webpack/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default function webpackConfig(
]
// browserFlags: devOptions.browserFlags
})
],
].filter(Boolean),
optimization: {
minimize: devOptions.mode === 'production'
// WARN: This can have side-effects.
Expand Down

0 comments on commit 07dc078

Please sign in to comment.