Skip to content

Method does not exist: math #9

@muuvmuuv

Description

@muuvmuuv

Tried some new functions from polish today with some errors... Here I downloaded and added a test to your plugin (btw, please add jest as dev dep.)

   polished  2. math

    SyntaxError: unknown: Method does not exist: math
    > 1 | import { math } from 'polished';
        |         ^
      2 |
      3 | let a = math('12px + 12px')

      44 |
      45 |             if (!value) {
    > 46 |               throw imported.buildCodeFrameError('Method does not exist: ' + importedName);
         |                              ^
      47 |             }
{
      title: "math",
      code: `
        import { math } from 'polished';

        let a = math('12px + 12px')
      `,
      output: `
        let a = '14px';
      `
    }

Related to: Corjen/gatsby-plugin-polished#1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions