forked from Ittai/ittai
parent
e516d572a3
commit
fda0793414
@ -0,0 +1,15 @@
|
||||
module.exports = function (code) {
|
||||
return code.replace(
|
||||
"export default ___CSS_LOADER_EXPORT___;",
|
||||
`let element;
|
||||
export default {add: () => {
|
||||
element = document.createElement("style");
|
||||
element.textContent = ___CSS_LOADER_EXPORT___;
|
||||
document.head.appendChild(element);
|
||||
}, remove: () => {
|
||||
if (!element) return;
|
||||
element.remove();
|
||||
element = null;
|
||||
}}`
|
||||
);
|
||||
};
|
@ -1,8 +1,10 @@
|
||||
{
|
||||
"name": "Ittai Example",
|
||||
"name": "Example Plugin",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"source": "https://bruh/moment",
|
||||
"updateUrl": "https://bruh/moment",
|
||||
"main": "index.js"
|
||||
"main": "index.js",
|
||||
"author": "AA",
|
||||
"description": "bruh"
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
},
|
||||
{
|
||||
"path": "example"
|
||||
}
|
||||
],
|
||||
"settings": {}
|
||||
}
|
Loading…
Reference in new issue