Skip to content

Commit 8307235

Browse files
committed
Bundle with webpack
1 parent 215a5e6 commit 8307235

File tree

9 files changed

+7238
-614
lines changed

9 files changed

+7238
-614
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ typings/
4747
# TypeScript cache
4848
*.tsbuildinfo
4949

50-
# TypeScript output files
51-
*.js
52-
5350
# Optional npm cache directory
5451
.npm
5552

DevToolsPlugin.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"name": "Testing Library Recorder",
55
"description": "Testing Library Extension for Chrome DevTools Recorder",
66
"permissions": [],
7-
"devtools_page": "DevToolsPlugin.html",
7+
"devtools_page": "index.html",
88
"content_security_policy": {
99
"extension_pages": "script-src 'self'; object-src 'self'"
1010
},

package-lock.json

Lines changed: 7188 additions & 606 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,31 @@
11
{
22
"private": true,
33
"scripts": {
4-
"prepare": "tsc"
4+
"start": "webpack --mode=development --watch",
5+
"build": "webpack --mode=production",
6+
"test": "tsc"
57
},
68
"dependencies": {
9+
"@babel/core": "^7.18.10",
10+
"@babel/preset-env": "^7.18.10",
11+
"@babel/preset-typescript": "^7.18.6",
712
"@puppeteer/replay": "^0.6.1",
13+
"babel-loader": "^8.2.5",
14+
"copy-webpack-plugin": "^11.0.0",
15+
"html-webpack-plugin": "^5.5.0",
816
"prettier": "^2.7.1",
917
"prettier-config-nick": "^1.0.3",
1018
"puppeteer": "^15.5.0",
11-
"typescript": "^4.7.4"
19+
"typescript": "^4.7.4",
20+
"webpack": "^5.74.0",
21+
"webpack-cli": "^4.10.0"
1222
},
23+
"babel": {
24+
"presets": [
25+
"@babel/preset-env",
26+
"@babel/preset-typescript"
27+
]
28+
},
29+
"browserslist": "chrome 104",
1330
"prettier": "prettier-config-nick"
1431
}
File renamed without changes.
File renamed without changes.

tsconfig.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
"compilerOptions": {
33
"strict": true,
44
"moduleResolution": "Node",
5+
"noEmit": true,
6+
"allowJs": true,
7+
"checkJs": true,
8+
"esModuleInterop": true,
59
"target": "ES2017"
6-
}
10+
},
11+
"exclude": ["dist"]
712
}

webpack.config.mjs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import CopyPlugin from "copy-webpack-plugin"
2+
import HtmlPlugin from "html-webpack-plugin"
3+
4+
export default {
5+
devtool: false,
6+
plugins: [
7+
new CopyPlugin({
8+
patterns: ["manifest.json"],
9+
}),
10+
new HtmlPlugin(),
11+
],
12+
module: {
13+
rules: [
14+
{
15+
exclude: /node_modules/,
16+
test: /\.(j|t)s$/,
17+
loader: "babel-loader",
18+
},
19+
],
20+
},
21+
resolve: {
22+
extensions: [".js", ".ts"],
23+
},
24+
}

0 commit comments

Comments
 (0)