Skip to content

Commit

Permalink
refactor(extension): set background script as non persistent and remo…
Browse files Browse the repository at this point in the history
…ve html template

background script do not use any persistent background feature, this was a legacy thing, this will definitely be a big take on performance improvement
https://developer.chrome.com/extensions/background_migration
  • Loading branch information
lutangar committed Feb 3, 2020
1 parent c2e2f0d commit 59d03aa
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 20 deletions.
5 changes: 3 additions & 2 deletions manifest/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ module.exports = Object.freeze({
manifest_version: 2,
icons,
background: {
page: 'background.html'
scripts: ['/js/browser-polyfill.js', 'js/background.bundle.js'],
persistent: false
},
content_scripts: [
{
Expand Down Expand Up @@ -54,7 +55,7 @@ module.exports = Object.freeze({
default_title: 'Bulles'
},
permissions: ['activeTab', 'storage'],
web_accessible_resources: ['img/*', 'fonts/*'],
web_accessible_resources: ['img/*', 'fonts/*']
// externally_connectable: {
// matches: ['https://*.lmem.net/*']
// }
Expand Down
7 changes: 0 additions & 7 deletions views/background.pug

This file was deleted.

6 changes: 0 additions & 6 deletions views/includes/devtools.pug

This file was deleted.

5 changes: 0 additions & 5 deletions webpack/config.plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ module.exports = (env = {}, argv = {}, buildPath) => {
'process.env': processENVVarsToInject(env)
}),
new ModuleNotFoundPlugin(path.resolve(__dirname, '..')),
new HtmlWebpackPlugin({
template: './views/background.pug',
filename: 'background.html',
inject: false
}),
new HtmlWebpackPlugin({
template: './views/options.pug',
filename: 'options.html',
Expand Down

0 comments on commit 59d03aa

Please sign in to comment.