Skip to content

Commit 7cccaa4

Browse files
committed
fix: compatibility with rsbuild
We replace a dirty hack by a call to the raw-loader from Webpack. This in turns allow us to build this MFE with rsbuild. We emulated the behaviour from frontend-app-discussions: openedx/frontend-app-discussions#27
1 parent 1cd02a9 commit 7cccaa4

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

package-lock.json

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"jquery": "3.6.1",
5656
"popper.js": "1.16.1",
5757
"prop-types": "15.8.1",
58+
"raw-loader": "^4.0.2",
5859
"react": "17.0.2",
5960
"react-dom": "17.0.2",
6061
"react-helmet": "^6.1.0",

src/components/bulk-email-tool/text-editor/TextEditor.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import 'tinymce/plugins/image';
1717
import 'tinymce/plugins/codesample';
1818
import '@edx/tinymce-language-selector';
1919

20-
import contentUiCss from 'tinymce/skins/ui/oxide/content.css';
21-
import contentCss from 'tinymce/skins/content/default/content.css';
20+
import contentUiCss from '!!raw-loader!tinymce/skins/ui/oxide/content.css';
21+
import contentCss from '!!raw-loader!tinymce/skins/content/default/content.css';
2222

2323
export default function TextEditor(props) {
2424
const {
@@ -38,7 +38,7 @@ export default function TextEditor(props) {
3838
'formatselect fontselect bold italic underline forecolor | codesample bullist numlist alignleft aligncenter alignright alignjustify indent | blockquote link image code ',
3939
skin: false,
4040
content_css: false,
41-
content_style: `${contentUiCss.toString()}\n${contentCss.toString()}`,
41+
content_style: `${contentUiCss}\n${contentCss}`,
4242
extended_valid_elements: 'span[lang|id] -span',
4343
block_unsupported_drop: false,
4444
image_advtab: true,

0 commit comments

Comments
 (0)