mirror of
https://iceshrimp.dev/blueb/Chuckya-fe-standalone.git
synced 2026-01-11 13:33:21 -08:00
[Glitch] Dont use CommonJS (require, module.exports) anywhere
Port 955179fc55 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
c81d1b0d38
commit
108720d7b0
15 changed files with 49 additions and 37 deletions
|
|
@ -1,10 +1,9 @@
|
|||
import 'packs/public-path';
|
||||
import ready from 'flavours/glitch/ready';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
|
||||
ready(() => {
|
||||
const React = require('react');
|
||||
const ReactDOM = require('react-dom');
|
||||
|
||||
[].forEach.call(document.querySelectorAll('[data-admin-component]'), element => {
|
||||
const componentName = element.getAttribute('data-admin-component');
|
||||
const { locale, ...componentProps } = JSON.parse(element.getAttribute('data-props'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue