Closed mxkyb closed 2 years ago
Hello,
first of all, great project!
There is a problem when using ES Modules for puppeteer scripts like this:
# action.yml - name: Audit uses: treosh/lighthouse-ci-action@v8 with: urls: https://some.url configPath: ./lighthouserc.json
// lighthouserc.json { "ci": { "collect": { "puppeteerScript": "index.cjs" } } }
// index.cjs module.exports = (...args) => { return import('./index.js').then((module) => { return module.default(...args); }); };
// index.js import {something} from 'somewhere'; const doThings = async (browser) => { await something(); }; export default doThings;
This will result in
Error: Not supported at module.exports ...
I think the problem comes from here, because es modules were still experimental in node 12. https://github.com/treosh/lighthouse-ci-action/blob/main/action.yml#L35
Hello,
first of all, great project!
There is a problem when using ES Modules for puppeteer scripts like this:
This will result in
I think the problem comes from here, because es modules were still experimental in node 12. https://github.com/treosh/lighthouse-ci-action/blob/main/action.yml#L35