Repository: bazelbuild/intellij
Issue: WebStorm 2020.3.3 with plugin 2021.05.12.1.5 is not functional

When I try to import every project from https://github.com/bazelbuild/rules_nodejs/tree/stable/examples IDE is trying to sync, but always comes to:

```
java.lang.RuntimeException: java.lang.ClassCastException: class com.intellij.webcore.moduleType.PlatformWebModuleType cannot be cast to class com.intellij.openapi.module.WebModuleType (com.intellij.webcore.moduleType.PlatformWebModuleType and com.intellij.openapi.module.WebModuleType are in unnamed module of loader com.intellij.util.lang.UrlClassLoader @9f70c54)
	at com.intellij.openapi.application.impl.LaterInvocator.invokeAndWait(LaterInvocator.java:149)
	at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:476)
	at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:481)
	at com.google.idea.common.util.Transactions.submitTransactionAndWait(Transactions.java:25)
	at com.google.idea.common.util.Transactions.submitWriteActionTransactionAndWait(Transactions.java:41)
	at com.google.idea.blaze.base.sync.ProjectUpdateSyncTask.lambda$updateProject$8(ProjectUpdateSyncTask.java:302)
	at com.google.idea.blaze.base.scope.Scope.push(Scope.java:40)
	at com.google.idea.blaze.base.sync.ProjectUpdateSyncTask.updateProject(ProjectUpdateSyncTask.java:293)
	at com.google.idea.blaze.base.sync.ProjectUpdateSyncTask.run(ProjectUpdateSyncTask.java:246)
	at com.google.idea.blaze.base.sync.ProjectUpdateSyncTask.runProjectUpdatePhase(ProjectUpdateSyncTask.java:120)
	at com.google.idea.blaze.base.sync.SyncPhaseCoordinator.lambda$updateProjectAndFinishSync$7(SyncPhaseCoordinator.java:509)
	at com.google.idea.blaze.base.sync.SyncScope.lambda$runWithTiming$1(SyncScope.java:61)
	at com.google.idea.blaze.base.sync.SyncScope.lambda$push$2(SyncScope.java:74)
	at com.google.idea.blaze.base.sync.SyncScope.push(SyncScope.java:89)
	at com.google.idea.blaze.base.sync.SyncScope.push(SyncScope.java:71)
	at com.google.idea.blaze.base.sync.SyncScope.runWithTiming(SyncScope.java:63)
	at com.google.idea.blaze.base.sync.SyncPhaseCoordinator.updateProjectAndFinishSync(SyncPhaseCoordinator.java:501)
	at com.google.idea.blaze.base.sync.SyncPhaseCoordinator.runSync(SyncPhaseCoordinator.java:405)
	at com.google.idea.blaze.base.sync.SyncPhaseCoordinator.lambda$syncProject$0(SyncPhaseCoordinator.java:230)
	at com.google.idea.blaze.base.scope.Scope.push(Scope.java:57)
	at com.google.idea.blaze.base.scope.Scope.root(Scope.java:33)
	at com.google.idea.blaze.base.sync.SyncPhaseCoordinator.lambda$syncProject$1(SyncPhaseCoordinator.java:220)
	at com.google.idea.blaze.base.async.executor.ProgressiveTaskWithProgressIndicator.lambda$submitTask$0(ProgressiveTaskWithProgressIndicator.java:79)
	at com.google.idea.blaze.base.async.executor.ProgressiveTaskWithProgressIndicator.lambda$submitTaskWithResult$4(ProgressiveTaskWithProgressIndicator.java:127)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:59)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:59)
	at com.google.idea.blaze.base.async.executor.ProgressiveTaskWithProgressIndicator.lambda$submitTaskWithResult$5(ProgressiveTaskWithProgressIndicator.java:127)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassCastException: class com.intellij.webcore.moduleType.PlatformWebModuleType cannot be cast to class com.intellij.openapi.module.WebModuleType (com.intellij.webcore.moduleType.PlatformWebModuleType and com.intellij.openapi.module.WebModuleType are in unnamed module of loader com.intellij.util.lang.UrlClassLoader @9f70c54)
	at com.intellij.openapi.module.WebModuleType.getInstance(WebModuleType.java:17)
	at com.google.idea.blaze.javascript.BlazeJavascriptSyncPlugin.getWorkspaceModuleType(BlazeJavascriptSyncPlugin.java:59)
	at com.google.idea.blaze.base.sync.ProjectUpdateSyncTask.updateProjectStructure(ProjectUpdateSyncTask.java:351)
	at com.google.idea.blaze.base.sync.ProjectUpdateSyncTask.lambda$updateProject$6(ProjectUpdateSyncTask.java:307)
	at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.mergeRootsChangesDuring(ProjectRootManagerImpl.java:402)
	at com.google.idea.blaze.base.sync.ProjectUpdateSyncTask.lambda$updateProject$7(ProjectUpdateSyncTask.java:305)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1000)
	at com.google.idea.common.util.Transactions.lambda$submitWriteActionTransactionAndWait$2(Transactions.java:41)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:216)
	at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:24)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:199)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeAndWait$8(ApplicationImpl.java:476)
	at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:126)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:85)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:134)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
	at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:190)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:976)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:843)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:454)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:453)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:501)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
```

Changed files:
javascript/src/com/google/idea/blaze/javascript/BlazeJavascriptSyncPlugin.java

diff --git a/javascript/src/com/google/idea/blaze/javascript/BlazeJavascriptSyncPlugin.java b/javascript/src/com/google/idea/blaze/javascript/BlazeJavascriptSyncPlugin.java
index 24ccdab84..edabcd8d6 100644
--- a/javascript/src/com/google/idea/blaze/javascript/BlazeJavascriptSyncPlugin.java
+++ b/javascript/src/com/google/idea/blaze/javascript/BlazeJavascriptSyncPlugin.java
@@ -36,7 +36,7 @@ import com.google.idea.blaze.base.sync.projectview.WorkspaceLanguageSettings;
 import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.module.Module;
 import com.intellij.openapi.module.ModuleType;
-import com.intellij.openapi.module.WebModuleType;
+import com.intellij.openapi.module.WebModuleTypeBase;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.roots.ModifiableRootModel;
 import com.intellij.openapi.roots.libraries.Library;
@@ -56,7 +56,7 @@ public class BlazeJavascriptSyncPlugin implements BlazeSyncPlugin {
   @Override
   public ModuleType<?> getWorkspaceModuleType(WorkspaceType workspaceType) {
     if (workspaceType == WorkspaceType.JAVASCRIPT) {
-      return WebModuleType.getInstance();
+      return WebModuleTypeBase.getInstance();
     }
     return null;
   }