This commit is contained in:
Quan HL
2024-05-07 13:29:47 +07:00
parent 55410adf2c
commit 225a5d16b0
4 changed files with 56 additions and 121 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "webrtc-chrome-ext",
"version": "1.0.5",
"version": "1.0.6",
"private": true,
"dependencies": {
"@chakra-ui/react": "^2.8.0",

View File

@@ -1,23 +0,0 @@
{
"version": "1.0.5",
"manifest_version": 3,
"name": "jambonz webrtc phone",
"description": "jambonz webrtc phone",
"action": {
"default_title": "jambonz webrtc phone"
},
"background": {
"service_worker": "background/index.js"
},
"permissions": ["storage"],
"host_permissions": ["https://*/*"],
"icons": {
"16": "icons/icon.png",
"48": "icons/icon.png",
"128": "icons/icon.png",
"192": "icons/icon192.png",
"384": "icons/icon384.png",
"512": "icons/icon512.png",
"1024": "icons/icon1024.png"
}
}

View File

@@ -1,8 +1,23 @@
{
"short_name": "Jambonz WebPhone",
"name": "Jambonz WebPhone",
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
"version": "1.0.6",
"manifest_version": 3,
"name": "jambonz webrtc phone",
"description": "jambonz webrtc phone",
"action": {
"default_title": "jambonz webrtc phone"
},
"background": {
"service_worker": "background/index.js"
},
"permissions": ["storage"],
"host_permissions": ["https://*/*"],
"icons": {
"16": "icons/icon.png",
"48": "icons/icon.png",
"128": "icons/icon.png",
"192": "icons/icon192.png",
"384": "icons/icon384.png",
"512": "icons/icon512.png",
"1024": "icons/icon1024.png"
}
}

View File

@@ -3,34 +3,34 @@ const HTMLPlugin = require("html-webpack-plugin");
const CopyPlugin = require("copy-webpack-plugin");
module.exports = [
{
entry: "./src/content/index.tsx",
target: "web",
mode: "production",
output: {
path: path.join(__dirname, "dist"),
filename: "js/content.js",
},
module: {
rules: [
{
test: /\.tsx?$/,
use: [
{
loader: "ts-loader",
options: {
compilerOptions: { noEmit: false },
},
},
],
exclude: /node_modules/,
},
],
},
resolve: {
extensions: [".ts", ".tsx", ".js"],
},
},
// {
// entry: "./src/content/index.tsx",
// target: "web",
// mode: "production",
// output: {
// path: path.join(__dirname, "dist"),
// filename: "js/content.js",
// },
// module: {
// rules: [
// {
// test: /\.tsx?$/,
// use: [
// {
// loader: "ts-loader",
// options: {
// compilerOptions: { noEmit: false },
// },
// },
// ],
// exclude: /node_modules/,
// },
// ],
// },
// resolve: {
// extensions: [".ts", ".tsx", ".js"],
// },
// },
{
entry: "./src/background/index.ts",
target: "web",
@@ -59,68 +59,6 @@ module.exports = [
extensions: [".ts", ".tsx", ".js"],
},
},
{
entry: {
index: "./src/index.tsx",
},
mode: "production",
module: {
rules: [
{
test: /\.tsx?$/,
use: [
{
loader: "ts-loader",
options: {
compilerOptions: { noEmit: false },
},
},
],
exclude: /node_modules/,
},
{
exclude: /node_modules/,
test: /\.css$/i,
use: ["style-loader", "css-loader"],
},
{
test: /\.s[ac]ss$/i,
use: [
// Creates `style` nodes from JS strings
"style-loader",
// Translates CSS into CommonJS
"css-loader",
// Compiles Sass to CSS
"sass-loader",
],
},
{
test: /\.txt$/i,
type: "asset/source",
},
],
},
plugins: [
new CopyPlugin({
patterns: [{ from: "public", to: ".." }],
}),
...getHtmlPlugins(["index"]),
],
resolve: {
alias: {
src: path.resolve(__dirname, "src/"),
},
extensions: [".tsx", ".ts", ".js", ".txt"],
},
output: {
path: path.join(__dirname, "dist/js"),
filename: "[name].js",
},
performance: {
maxEntrypointSize: 512000,
maxAssetSize: 512000,
},
},
{
entry: {
index: "./src/window/index.tsx",
@@ -162,7 +100,12 @@ module.exports = [
},
],
},
plugins: [...getHtmlPlugins(["index"])],
plugins: [
new CopyPlugin({
patterns: [{ from: "public", to: ".." }],
}),
...getHtmlPlugins(["index"]),
],
resolve: {
alias: {
src: path.resolve(__dirname, "src/"),