-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
I'm using webpack-dev-server to avoid having to refresh the extension popup page, so I'm not currently starting webpack with webpack -w
but with the following code:
var compiler = webpack(configs);
var server = new WebpackDevServer(
{
https: false,
hot: false,
client: false,
host: 'localhost',
port: PORT,
static: {
directory: join(__dirname, '../build'),
},
devMiddleware: {
publicPath: `http://localhost:${PORT}/`,
writeToDisk: true,
},
headers: {
'Access-Control-Allow-Origin': '*',
},
allowedHosts: 'all',
},
compiler
);
Is it possible to make web-ext run
work with the above configuration?
Activity
birtles commentedon Nov 29, 2023
I'm afraid I'm not familiar with how
webpack-dev-server
differs fromwebpack -w
.I use
webpack -w
and it automatically reloads the options page and re-injects the content scripts, at least on Firefox.GabenGar commentedon Mar 11, 2024
You have
writeToDisk
option enabled and that means you can point to the html file in your manifest which gets fed towebpack-dev-server
.And yes, it does mean you'll have to manage slightly different manifests for development and production.