Skip to content

Commit f3c8e5b

Browse files
authored
Merge pull request #1 from octohedron/fix/hmr-background
Fix/hmr background
2 parents 86f6e66 + b751804 commit f3c8e5b

File tree

16 files changed

+595
-11637
lines changed

16 files changed

+595
-11637
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ $ PORT=6002 npm run start
7676

7777
## Content Scripts
7878

79-
Although this boilerplate uses the webpack dev server, it's also prepared to write all your bundles files on the disk at every code change, so you can point, on your extension manifest, to your bundles that you want to use as [content scripts](https://developer.chrome.com/extensions/content_scripts), but you need to exclude these entry points from hot reloading [(why?)](https://github.com/samuelsimoes/chrome-extension-webpack-boilerplate/issues/4#issuecomment-261788690). To do so you need to expose which entry points are content scripts on the `webpack.config.js` using the `chromeExtensionBoilerplate -> notHotReload` config. Look the example below.
79+
Although this boilerplate uses the webpack dev server, it's also prepared to write all your bundles files on the disk at every code change, so you can point, on your extension manifest, to your bundles that you want to use as [content scripts](https://developer.chrome.com/extensions/content_scripts), but you need to exclude these entry points from hot reloading [(why?)](https://github.com/samuelsimoes/chrome-extension-webpack-boilerplate/issues/4#issuecomment-261788690). To do so you need to expose which entry points are content scripts on the `webpack.config.js` using the `custom -> notHMR` config. Look the example below.
8080

8181
Let's say that you want use the `myContentScript` entry point as content script, so on your `webpack.config.js` you will configure the entry point and exclude it from hot reloading, like this:
8282

@@ -86,8 +86,8 @@ Let's say that you want use the `myContentScript` entry point as content script,
8686
entry: {
8787
myContentScript: "./src/js/myContentScript.js"
8888
},
89-
chromeExtensionBoilerplate: {
90-
notHotReload: ["myContentScript"]
89+
custom: {
90+
notHMR: ["myContentScript"]
9191
}
9292
9393
}

0 commit comments

Comments
 (0)