tinymce / tinymce-angular

Official TinyMCE Angular Component
MIT License
320 stars 92 forks source link

From 5 to 6 : "theme.js" in browser cache #299

Open MEChasle opened 2 years ago

MEChasle commented 2 years ago

What is the current behavior? I have updated Tinymce from 5.X.X to 6.X.X and the following error threw.

global.throttle is not a function

When I reload or remove browser cache, there is no more error.

Please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox.io or similar. I had Tinymce 5.X.X and in angular.json :

{
  "projects": {
    "my-project": {
      "architect": {
        "build": {
          "options": {
            "assets": [
              {
                "glob": "content.min.css",
                "input": "node_modules/tinymce/skins/content/default",
                "output": "/assets/tinymce/"
              },
              {
                "glob": "**/*",
                "input": "node_modules/tinymce",
                "output": "/assets/tinymce"
              }
            ]
          }
        }
      }
    }
  }
}

I have updated to Tinymce 6.X.X and deploy my app and get the following error.

global.throttle is not a function

It's a matter of browser cache about theme.js loading. I suppose theme.js from Tinymce 5.X.X is not compatible with Tinymce 6.X.X running.

When I reload my app multiple times or remove browser cache, there is no more error. I suppose theme.js from Tinymce 6.X.X is uploaded and replace theme.js from Tinymce 5.X.X in browser cache.

What is the expected behavior?

I will expect to put all needed files in vendor.js (or another file of angular). Indeed, this angular files could have hash in their names and so there will be versioned.

Which versions of TinyMCE/TinyMCE-Angular, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or TinyMCE-Angular?

exalate-issue-sync[bot] commented 2 years ago

Ref: INT-2922