Token import() from webpack used for chunks is not supported by sonarqube

Dear all,

Thanks for doing sonarqube and sonarcloud.

We use both to store our code quality coverage private and open source.

It seems that import() from webpack used for chunking is not supported by sonar-scanner v2.8, this is a sample of error we get while using the scanner:

ERROR: Unable to parse file: /mnt/mesos/sandbox/builds/yeutech/www/src/containers/page/NotFoundPage/Loadable.js
ERROR: Parse error at line 4 column 17:

1: import Loadable from '../../../components/Loadable/index';
2: 
3: export default Loadable({
4:   loader: () => import(/* webpackPrefetch: true */ './index'),
                   ^
5: });
6: 
7: 

We are using sonarqube Version 6.3.1.21392, we haven’t tried any update because we found this one to be stable and working and doesn’t need so far to upgrade.

What is the prefered behavior about this ?

Related issues

The preferred behaviour is to upgrade your SonarQube:) There is a 7.9 LTS release today, many new features and bug fixed, you should definitely upgrade.

If you don’t want to upgrade SonarQube, at least upgrade SonarJS (JS analyzer), as I can’t reproduce your problem with the latest version of it.