diff --git a/src/content/content.ts b/src/content/modules/launcher/launch_homepage.ts similarity index 90% rename from src/content/content.ts rename to src/content/modules/launcher/launch_homepage.ts index 191bfa7..71e9d94 100644 --- a/src/content/content.ts +++ b/src/content/modules/launcher/launch_homepage.ts @@ -1,7 +1,7 @@ -import { poll_feed } from "../background/pull_feed" -import { store_classes } from "./modules/launcher/getters/get_classes" -import { get_news_channels } from "./modules/launcher/main" -import setup_launcher from "./modules/launcher/setup_launcher" +import { poll_feed } from "../../../background/pull_feed" +import { store_classes } from "./getters/get_classes" +import { get_news_channels } from "./main" +import setup_launcher from "./setup_launcher" // Function to inject the launcher function inject_launcher(): void { diff --git a/src/content/launch_shortcut.ts b/src/content/modules/launcher/launch_shortcut.ts similarity index 88% rename from src/content/launch_shortcut.ts rename to src/content/modules/launcher/launch_shortcut.ts index b044f2e..a8e9bd2 100644 --- a/src/content/launch_shortcut.ts +++ b/src/content/modules/launcher/launch_shortcut.ts @@ -1,6 +1,6 @@ -import launcher from "../background/events/injects/launcher" -import { get_news_channels, on_input, on_keydown } from "./modules/launcher/main" -import setup_launcher from "./modules/launcher/setup_launcher" +import launcher from "../../../background/events/injects/launcher" +import { get_news_channels, on_input, on_keydown } from "./main" +import setup_launcher from "./setup_launcher" function inject_launcher_shortcut() { get_news_channels() diff --git a/src/content/launcher_styles.css b/src/content/modules/launcher/launcher_styles.css similarity index 100% rename from src/content/launcher_styles.css rename to src/content/modules/launcher/launcher_styles.css diff --git a/webpack.config.cjs b/webpack.config.cjs index fc11525..effc87b 100644 --- a/webpack.config.cjs +++ b/webpack.config.cjs @@ -9,11 +9,15 @@ module.exports = (env, argv) => { mode: isDevelopment ? "development" : "production", devtool: isDevelopment ? "cheap-module-source-map" : "source-map", + performance: { + hints: false, + }, + entry: { popup: "./src/popup/popup.ts", background: "./src/background/background.ts", - content: "./src/content/content.ts", - launcher_shortcut: "./src/content/launch_shortcut.ts", + launcher_homepage: "./src/content/modules/launcher/launch_homepage.ts", + launcher_shortcut: "./src/content/modules/launcher/launch_shortcut.ts", get_textbooks: "./src/content/modules/launcher/getters/get_textbooks.ts", inject_css_tools: "./src/content/inject_css_tools.ts", news_search_main: "./src/content/modules/news_search/news_search.ts", @@ -68,6 +72,7 @@ module.exports = (env, argv) => { }), new CopyWebpackPlugin({ patterns: [ + // essential chrome extension files { from: "src/manifest.json", to: "manifest.json", @@ -79,6 +84,8 @@ module.exports = (env, argv) => { noErrorOnMissing: true, globOptions: { ignore: ["**/.*"] }, }, + + // popup and stylessheet injects { from: "src/popup/styles.css", to: "styles.css", @@ -89,16 +96,22 @@ module.exports = (env, argv) => { to: "inject.css", noErrorOnMissing: false, }, + + // modules -> launcher { - from: "src/content/launcher_styles.css", + from: "src/content/modules/launcher/launcher_styles.css", to: "launcher_styles.css", noErrorOnMissing: false, }, + + // modules -> news search { from: "src/content/modules/news_search/news_search.css", to: "news_search_styles.css", noErrorOnMissing: false, }, + + // modules -> post history tracking { from: "src/content/modules/post_history_tracking/news_history.css", to: "news_history.css",