Webpack 2 and Angular 2 compability?
See original GitHub issueWhen using Unminified TinyMCE with webpack 2 and angular2, error is thrown and the app dies:
Error: Zone.js has detected that ZoneAwarePromise
(window|global).Promisehas been overwritten
If I use minified version. that error is not thrown, however
Factory.ui
is undefined
Feature request: Make TinyMCE compatible with module bundlers like webpack and work with angular2
Issue Analytics
- State:
- Created 7 years ago
- Comments:24
Top Results From Across the Web
Setting Up Angular 2 with Webpack - Semaphore Tutorial
In this tutorial we'll take a look at the steps needed to set up a test-driven Angular 2 project with Webpack and TypeScript....
Read more >Angular without angular cli for Angular 12.x and webpack 5.x
Angular version was updated to the 5.1.2 and while I am testing the post code, I have got the npm debs exceptions. It...
Read more >Would you use Webpack with Angular and Angular 2? - Quora
If your question is “If Webpack can be used with Angularjs?”, then yes it can and its a good idea to use it...
Read more >webpack 2, angular 2 - using "require" with path built using ...
in the webpack.common.js file i've added new file to my entry object which i called : boot.js . so the structure is like...
Read more >How To Use Custom webpack Configurations with Angular ...
How To Use Custom webpack Configurations with Angular CLI Builders · Step 1 — Setting Up the Project · Step 2 — Building...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi again @JT-Bruch, @thehashrocket and everyone!
Sorry for the mixup, apparently I was using the nightly build at work and that’s why it didn’t work like expected for you guys… But the good news is I found another way to get it working!
Instead of importing them in the component file, add the paths to the plugins to the
scripts
in yourangular-cli.json
just like you already did with tinymce, then it should be working!See here for my working examples
angular-cli.json
file, and here for a deployed version.So sorry for the mess, I will be updating the documentation today!
Edit: The documentation has now been updated!
Have you configured Webpack like it says in #2836 to use the imports-loader and exports-loader? Then you shouldn’t have to add it to the head tag.
If you are using angular-cli you can easily, without using any special loaders, use tinymce without having to add it to the head-tag by adding the path to TinyMCE to the
angular-cli.json
file, like it says in the documentation here.So you would first install tinymce with
npm install --save tinymce
, then add"../node_modules/tinymce/tinymce.js"
to yourangular-cli.json
and it should be available globally in your project.Typescript will however complain that it “cannot fint name ‘tinymce’” so you would have to add something like, either directly in the file or to your
typings.d.ts
:To get the skins working you could then copy the skins folder from
node_modules/tinymce/skins' to
src/assets/skins` and configure TinyMCE when you initialize it with the url like this:angular-cli
will then be smart enough to copy along the assets both while developing with the dev server usingng serve
, but also when you build your project withng build
.