Using protractor and trying to switch to using es6 import instead of commonjs require approach
- I changed
package.jsonand added (in the top section)"type": "module" - I renamed my two app files from
.jsto.mjs - I changed my protractor
conf.jsto beconf.mjs - I changed my protractor conf file to use
specs: ['spec.mjs']as the test file to run - I changed my conf file extension from
.jsto.cjs - I changed the require to be
import { httpGet } from './support' - I tried
--experimental-modulesbut that gave an error with above setup
However when I run
protractor conf.mjs
I get
Must use import to load ES Module