adjust the file path
This commit is contained in:
@@ -20,8 +20,8 @@ function override(config, env) {
|
|||||||
content: paths.appSrc + "/content.js",
|
content: paths.appSrc + "/content.js",
|
||||||
};
|
};
|
||||||
// Change output filename template to get rid of hash there
|
// Change output filename template to get rid of hash there
|
||||||
config.output.filename = "static/js/[name].js";
|
config.output.filename = "[name].js";
|
||||||
config.output.assetModuleFilename = "static/media/[name][ext]";
|
config.output.assetModuleFilename = "media/[name][ext]";
|
||||||
// Disable built-in SplitChunksPlugin
|
// Disable built-in SplitChunksPlugin
|
||||||
config.optimization.splitChunks = {
|
config.optimization.splitChunks = {
|
||||||
cacheGroups: { default: false },
|
cacheGroups: { default: false },
|
||||||
|
|||||||
8
dist/chrome/asset-manifest.json
vendored
8
dist/chrome/asset-manifest.json
vendored
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"popup.js": "/static/js/popup.js",
|
"popup.js": "/popup.js",
|
||||||
"options.js": "/static/js/options.js",
|
"options.js": "/options.js",
|
||||||
"background.js": "/static/js/background.js",
|
"background.js": "/background.js",
|
||||||
"content.js": "/static/js/content.js",
|
"content.js": "/content.js",
|
||||||
"content.html": "/content.html",
|
"content.html": "/content.html",
|
||||||
"options.html": "/options.html",
|
"options.html": "/options.html",
|
||||||
"popup.html": "/popup.html"
|
"popup.html": "/popup.html"
|
||||||
|
|||||||
2
dist/chrome/content.html
vendored
2
dist/chrome/content.html
vendored
File diff suppressed because one or more lines are too long
4
dist/chrome/manifest.json
vendored
4
dist/chrome/manifest.json
vendored
@@ -7,12 +7,12 @@
|
|||||||
"author": "Gabe<yugang2002@gmail.com>",
|
"author": "Gabe<yugang2002@gmail.com>",
|
||||||
"homepage_url": "https://github.com/fishjar/kiss-translator",
|
"homepage_url": "https://github.com/fishjar/kiss-translator",
|
||||||
"background": {
|
"background": {
|
||||||
"service_worker": "static/js/background.js",
|
"service_worker": "background.js",
|
||||||
"type": "module"
|
"type": "module"
|
||||||
},
|
},
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
"js": ["static/js/content.js"],
|
"js": ["content.js"],
|
||||||
"matches": ["<all_urls>"]
|
"matches": ["<all_urls>"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
2
dist/chrome/options.html
vendored
2
dist/chrome/options.html
vendored
@@ -1 +1 @@
|
|||||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>KISS Translator</title><script defer="defer" src="/static/js/options.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>KISS Translator</title><script defer="defer" src="/options.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
||||||
2
dist/chrome/popup.html
vendored
2
dist/chrome/popup.html
vendored
@@ -1 +1 @@
|
|||||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>KISS Translator</title><script defer="defer" src="/static/js/popup.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>KISS Translator</title><script defer="defer" src="/popup.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
||||||
8
dist/edge/asset-manifest.json
vendored
8
dist/edge/asset-manifest.json
vendored
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"popup.js": "/static/js/popup.js",
|
"popup.js": "/popup.js",
|
||||||
"options.js": "/static/js/options.js",
|
"options.js": "/options.js",
|
||||||
"background.js": "/static/js/background.js",
|
"background.js": "/background.js",
|
||||||
"content.js": "/static/js/content.js",
|
"content.js": "/content.js",
|
||||||
"content.html": "/content.html",
|
"content.html": "/content.html",
|
||||||
"options.html": "/options.html",
|
"options.html": "/options.html",
|
||||||
"popup.html": "/popup.html"
|
"popup.html": "/popup.html"
|
||||||
|
|||||||
2
dist/edge/content.html
vendored
2
dist/edge/content.html
vendored
File diff suppressed because one or more lines are too long
4
dist/edge/manifest.json
vendored
4
dist/edge/manifest.json
vendored
@@ -7,12 +7,12 @@
|
|||||||
"author": "Gabe<yugang2002@gmail.com>",
|
"author": "Gabe<yugang2002@gmail.com>",
|
||||||
"homepage_url": "https://github.com/fishjar/kiss-translator",
|
"homepage_url": "https://github.com/fishjar/kiss-translator",
|
||||||
"background": {
|
"background": {
|
||||||
"service_worker": "static/js/background.js",
|
"service_worker": "background.js",
|
||||||
"type": "module"
|
"type": "module"
|
||||||
},
|
},
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
"js": ["static/js/content.js"],
|
"js": ["content.js"],
|
||||||
"matches": ["<all_urls>"]
|
"matches": ["<all_urls>"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
2
dist/edge/options.html
vendored
2
dist/edge/options.html
vendored
@@ -1 +1 @@
|
|||||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>KISS Translator</title><script defer="defer" src="/static/js/options.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>KISS Translator</title><script defer="defer" src="/options.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
||||||
2
dist/edge/popup.html
vendored
2
dist/edge/popup.html
vendored
@@ -1 +1 @@
|
|||||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>KISS Translator</title><script defer="defer" src="/static/js/popup.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>KISS Translator</title><script defer="defer" src="/popup.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
||||||
8
dist/firefox/asset-manifest.json
vendored
8
dist/firefox/asset-manifest.json
vendored
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"popup.js": "/static/js/popup.js",
|
"popup.js": "/popup.js",
|
||||||
"options.js": "/static/js/options.js",
|
"options.js": "/options.js",
|
||||||
"background.js": "/static/js/background.js",
|
"background.js": "/background.js",
|
||||||
"content.js": "/static/js/content.js",
|
"content.js": "/content.js",
|
||||||
"content.html": "/content.html",
|
"content.html": "/content.html",
|
||||||
"options.html": "/options.html",
|
"options.html": "/options.html",
|
||||||
"popup.html": "/popup.html"
|
"popup.html": "/popup.html"
|
||||||
|
|||||||
2
dist/firefox/content.html
vendored
2
dist/firefox/content.html
vendored
File diff suppressed because one or more lines are too long
4
dist/firefox/manifest.json
vendored
4
dist/firefox/manifest.json
vendored
@@ -7,11 +7,11 @@
|
|||||||
"author": "Gabe<yugang2002@gmail.com>",
|
"author": "Gabe<yugang2002@gmail.com>",
|
||||||
"homepage_url": "https://github.com/fishjar/kiss-translator",
|
"homepage_url": "https://github.com/fishjar/kiss-translator",
|
||||||
"background": {
|
"background": {
|
||||||
"scripts": ["static/js/background.js"]
|
"scripts": ["background.js"]
|
||||||
},
|
},
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
"js": ["static/js/content.js"],
|
"js": ["content.js"],
|
||||||
"matches": ["<all_urls>"]
|
"matches": ["<all_urls>"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
2
dist/firefox/options.html
vendored
2
dist/firefox/options.html
vendored
@@ -1 +1 @@
|
|||||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>KISS Translator</title><script defer="defer" src="/static/js/options.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>KISS Translator</title><script defer="defer" src="/options.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
||||||
2
dist/firefox/popup.html
vendored
2
dist/firefox/popup.html
vendored
@@ -1 +1 @@
|
|||||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>KISS Translator</title><script defer="defer" src="/static/js/popup.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>KISS Translator</title><script defer="defer" src="/popup.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
||||||
@@ -19,9 +19,9 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-app-rewired start",
|
"start": "react-app-rewired start",
|
||||||
"build": "BUILD_PATH=./build/chrome REACT_APP_BROWSER=chrome react-app-rewired build",
|
"build": "BUILD_PATH=./build/chrome REACT_APP_BROWSER=chrome react-app-rewired build && rm ./build/chrome/manifest.firefox.json",
|
||||||
"build:edge": "BUILD_PATH=./build/edge REACT_APP_BROWSER=edge react-app-rewired build",
|
"build:edge": "BUILD_PATH=./build/edge REACT_APP_BROWSER=edge react-app-rewired build && rm ./build/edge/manifest.firefox.json",
|
||||||
"build:firefox": "BUILD_PATH=./build/firefox REACT_APP_BROWSER=firefox react-app-rewired build && cp ./manifest.firefox.json ./build/firefox/manifest.json",
|
"build:firefox": "BUILD_PATH=./build/firefox REACT_APP_BROWSER=firefox react-app-rewired build && rm ./build/firefox/manifest.json && mv ./build/firefox/manifest.firefox.json ./build/firefox/manifest.json",
|
||||||
"build:all": "yarn build && yarn build:edge && yarn build:firefox",
|
"build:all": "yarn build && yarn build:edge && yarn build:firefox",
|
||||||
"dist": "yarn build:all && rm -r dist && cp -r build dist",
|
"dist": "yarn build:all && rm -r dist && cp -r build dist",
|
||||||
"test": "react-app-rewired test",
|
"test": "react-app-rewired test",
|
||||||
|
|||||||
@@ -7,11 +7,11 @@
|
|||||||
"author": "Gabe<yugang2002@gmail.com>",
|
"author": "Gabe<yugang2002@gmail.com>",
|
||||||
"homepage_url": "https://github.com/fishjar/kiss-translator",
|
"homepage_url": "https://github.com/fishjar/kiss-translator",
|
||||||
"background": {
|
"background": {
|
||||||
"scripts": ["static/js/background.js"]
|
"scripts": ["background.js"]
|
||||||
},
|
},
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
"js": ["static/js/content.js"],
|
"js": ["content.js"],
|
||||||
"matches": ["<all_urls>"]
|
"matches": ["<all_urls>"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -7,12 +7,12 @@
|
|||||||
"author": "Gabe<yugang2002@gmail.com>",
|
"author": "Gabe<yugang2002@gmail.com>",
|
||||||
"homepage_url": "https://github.com/fishjar/kiss-translator",
|
"homepage_url": "https://github.com/fishjar/kiss-translator",
|
||||||
"background": {
|
"background": {
|
||||||
"service_worker": "static/js/background.js",
|
"service_worker": "background.js",
|
||||||
"type": "module"
|
"type": "module"
|
||||||
},
|
},
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
"js": ["static/js/content.js"],
|
"js": ["content.js"],
|
||||||
"matches": ["<all_urls>"]
|
"matches": ["<all_urls>"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user