From 161a4b756b9a0d26b4de5071f3eefdbfa3b3d873 Mon Sep 17 00:00:00 2001 From: dermeck Date: Sun, 8 Dec 2024 16:51:31 +0100 Subject: [PATCH] try using acorn components --- src/sidebar/SubscribeView/SubscribeView.tsx | 5 ++++- src/sidebar/sidebar.html | 1 + test.d.ts | 1 + webpack.config.js | 8 ++++++++ 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 test.d.ts diff --git a/src/sidebar/SubscribeView/SubscribeView.tsx b/src/sidebar/SubscribeView/SubscribeView.tsx index af18bf0..b84f259 100644 --- a/src/sidebar/SubscribeView/SubscribeView.tsx +++ b/src/sidebar/SubscribeView/SubscribeView.tsx @@ -9,7 +9,8 @@ import { DetectedFeeds } from './DetectedFeeds/DetectedFeeds'; import { Button } from '../../base-components/Button/Button'; import { Header } from '../../base-components/Header/Header'; import { clsx } from 'clsx'; - +// eslint-disable-next-line @typescript-eslint/no-unused-vars +import M from 'moz-button'; const isValidURL = (str: string) => { const res = str.match( /(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/g, @@ -62,6 +63,8 @@ export const SubscribeView = (props: SubscribeViewProps) => { + moep +

Add New Feed

diff --git a/src/sidebar/sidebar.html b/src/sidebar/sidebar.html index c3e6977..ff59062 100644 --- a/src/sidebar/sidebar.html +++ b/src/sidebar/sidebar.html @@ -4,6 +4,7 @@ + diff --git a/test.d.ts b/test.d.ts new file mode 100644 index 0000000..bfb6180 --- /dev/null +++ b/test.d.ts @@ -0,0 +1 @@ +declare module 'moz-button'; diff --git a/webpack.config.js b/webpack.config.js index bc0dfd4..4bb049c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -29,6 +29,14 @@ module.exports = (env) => ({ resolve: { extensions: ['.ts', '.tsx', '.js'], + alias: { + 'moz-button': path.resolve('chrome://global/content/elements/moz-button.mjs'), + }, + }, + + externalsType: 'import', + externals: { + 'moz-button': 'chrome://global/content/elements/moz-button.mjs', }, plugins: [