lxieyang / chrome-extension-boilerplate-react

A Chrome Extensions boilerplate using React 18 and Webpack 5.
MIT License
3.42k stars 1.07k forks source link

Unable to Remove NewTab Redirect #180

Open loganfarrow opened 1 year ago

loganfarrow commented 1 year ago

For some reason, I am unable to remove the new tab override from the extension even after follow these steps. Any help is appreciated greatly.

I have removed this from webpack.config.js:

newtab: path.join(__dirname, 'src', 'pages', 'Newtab', 'index.jsx'),
new HtmlWebpackPlugin({
  template: path.join(__dirname, 'src', 'pages', 'Newtab', 'index.html'),
  filename: 'newtab.html',
  chunks: ['newtab'],
  cache: false,
}),

Also, this from manifest.json:

"chrome_url_overrides": {
  "newtab": "newtab.html"
},

Other steps I've taken:

  1. I've removed the extension from Chrome.
  2. Ran $ NODE_ENV=production npm run build.
  3. Ran npm run build.
  4. Ran npm start.
  5. Added extension back to Chrome and still getting redirect. Removing pages/newtab gives a compilation error.
alex-oleks commented 10 months ago

have you solved your problem? Because I also struggle with it

congdv commented 9 months ago

Somehow it was working for me with above steps without removing pages/newtab

I restarted my chrome after rebuilding the project and it worked for me