Skip to content

Commit

Permalink
Enable webpack hot reload
Browse files Browse the repository at this point in the history
Based on samuelsimoes/chrome-extension-webpack-boilerplate, I enable
webpack hot reload. content script is excluded in hot reloaded entry.

See:
- https://github.com/samuelsimoes/chrome-extension-webpack-boilerplate
- samuelsimoes/chrome-extension-webpack-boilerplate#4 (comment)
  • Loading branch information
taehwanno committed Feb 7, 2019
1 parent 6e5c53c commit 8b53cb4
Show file tree
Hide file tree
Showing 16 changed files with 1,798 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- ./node_modules
- run:
name: Build
command: npm run build:prod
command: npm run build
- run:
name: Test
command: npm run test:coverage
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,5 @@ $RECYCLE.BIN/
# End of https://www.gitignore.io/api/node,macos,windows,visualstudiocode

# Custom
dist/js
dist/
tmp/
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"typescript.tsdk": "./node_modules/typescript/lib",
"json.schemas": [
{
"fileMatch": ["dist/manifest.json"],
"fileMatch": ["public/manifest.json"],
"url": "http://json.schemastore.org/chrome-manifest"
}
],
Expand Down
4 changes: 2 additions & 2 deletions dist/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
{
"matches": ["https://www.instagram.com/"],
"run_at": "document_idle",
"js": ["js/content-script.js"]
"js": ["content-script.js"]
}
],
"background": {
"scripts": ["js/background.js"],
"scripts": ["background.js"],
"persistent": false
},
"permissions": ["tabs", "webNavigation"]
Expand Down
6 changes: 3 additions & 3 deletions dist/options.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>Instagram Shortcut Extension Options</title>
<meta charset="UTF-8" />
<title>options.html</title>
</head>
<body>
<p>Instagram Shortcut Extension Options</p>
<script src="js/options.js"></script>
<p>options.html</p>
</body>
</html>
9 changes: 4 additions & 5 deletions dist/popup.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<meta charset="UTF-8" />
<title>Instagram Shortcut Extension</title>
<title>popup.html</title>
</head>
<body>
<p>Instagram Shortcut Extension</p>
<script src="js/popup.js"></script>
</body>
<p>popup.html</p>
<script type="text/javascript" src="popup.js"></script></body>
</html>
Loading

0 comments on commit 8b53cb4

Please sign in to comment.