Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

percy --config fails silently when .js config attempts an import or require #820

Open
aresnick opened this issue Mar 9, 2022 · 1 comment
Labels
🐛 bug Something isn't working

Comments

@aresnick
Copy link

aresnick commented Mar 9, 2022

The problem

I'd like to import breakpoints for use in widths in .percy.js. The following .percy.js does not work (i.e. the widths are not respected, and instead the defaults of 375 and 1280 are used) when used via percy snapshot --config=.percy.js snapshots.js, but does when the require line is removed (similarly with the equivalent import).

const { breakpoints } = require("./site-data.js");

module.exports = {
  version: 2,
  snapshot: {
    widths: [378, 1283],
    minHeight: 1024,
    percyCSS: "",
  },
  discovery: {
    networkIdleTimeout: 100,
  },
  static: {
    cleanUrls: false,
  },
  upload: {
    files: "**/*.{png,jpg,jpeg}",
    ignore: "",
    stripExtensions: false,
  },
};

Environment

  • Node version: v14.18.3 (npm v6.14.15)
  • @percy/cli version: @percy/cli 1.0.0-beta.76
  • Version of Percy SDK you’re using: N/A
  • If needed, a build or snapshot ID: https://percy.io/be8d462e/powderhouse.org/builds/16394515
  • OS version: macOS 12.1 (21C52)
  • Type of shell command-line [interface]: zsh

Details

None beyond the above.

Debug logs

It's not clear whether/how the Percy CLI has a --debug or --verbose option.

Code to reproduce issue

None beyond the above.

@github-actions

This comment was marked as outdated.

@github-actions github-actions bot added the 🍞 stale Closed due to inactivity label Mar 29, 2022
@Robdel12 Robdel12 added 🐛 bug Something isn't working and removed 🍞 stale Closed due to inactivity labels Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants