tinymce-react icon indicating copy to clipboard operation
tinymce-react copied to clipboard

Hosting the TinyMCE package with the React framework not working in production

Open sgidd opened this issue 3 years ago • 1 comments

I have implemented tinymce using package manager with hosting which works fine in my localhost but when it is deployed in production build AWS its failing with below error :

image

I have followed the step as suggested in https://www.tiny.cloud/docs/tinymce/6/react-pm-host/

image

image

package.json file :

"scripts": { "prebuild": "npm run tinymce-postinstall", "build": "webpack --mode production --env BASE_URL=/api", "predev": "npm run tinymce-postinstall", "dev": "npm run webpack-dev", }

any assist on this will be great help .

sgidd avatar Oct 03 '22 18:10 sgidd

Ref: INT-3022

exalate-issue-sync[bot] avatar Oct 03 '22 18:10 exalate-issue-sync[bot]

According to the error message the file is being served as HTML instead of Javascript. I think you have some settings wrong on AWS.

This stackoverflow question seems related to your problem so maybe try one of those solutions: https://stackoverflow.com/questions/67925203/aws-cloudfront-serving-javascript-modules-as-wrong-mime-type-text-plain

tiny-james avatar Oct 24 '22 08:10 tiny-james