clean-webpack-plugin

This commit is contained in:
Sriram Hariharan
2023-03-03 11:02:46 -06:00
parent b0eba78697
commit 5203d3acf8
5 changed files with 356 additions and 277 deletions

614
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -14,6 +14,7 @@
},
"dependencies": {
"chrome-extension-toolkit": "^0.0.21",
"clean-webpack-plugin": "^4.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sass": "^1.57.1"

BIN
public/grades.db Normal file

Binary file not shown.

View File

@@ -0,0 +1,5 @@
import React from 'react';
export default function Main() {
return <div />;
}

View File

@@ -1,18 +1,15 @@
import React from 'react';
import { render } from 'react-dom';
import { bMessenger } from 'src/shared/messages';
import { ContextInvalidated, createShadowDOM, onContextInvalidated } from 'chrome-extension-toolkit';
import { Button } from './components/Button/Button';
import Main from './Main';
bMessenger.getTabId().then(tabId => {
console.log('tabId', tabId);
});
injectReact();
async function injectReact() {
const shadowDom = createShadowDOM('extension-dom-container');
render(<Button />, shadowDom.shadowRoot);
const shadowDom = createShadowDOM('ut-registration-plus-dom-container');
render(<Main />, shadowDom.shadowRoot);
await shadowDom.addStyle('static/css/content.css');
}