Skip to content

Production #2

@razvanip

Description

@razvanip

Hello,

I have a transform used in production, let's say a sentry reporter.
I am getting this error 'File/Program node, we can't possibly find a statement parent to this'.

in my babelrc for production i use :

"env": {
      "production": {
        "optional": [
          "optimisation.react.constantElements",
          "optimisation.react.inlineElements",
          ],
          "plugins": ["react-transform"],
          "extra": {
            "react-transform": {
              "transforms": [{
                 "transform": "./react-transform-sentry-errors",
                 "imports": ["react","raven-js"],
                 "locals": ["'https://sentry@dns"]
               }]
            }
          }
      },
      "development": {
        "plugins": ["react-transform"],
        "extra": {
          "react-transform": {
            "transforms": [
            {
              "transform": "react-transform-hmr",
              "imports": ["react"],
              "locals": ["module"]
            },
            {
              "transform": "react-transform-catch-errors",
              "imports": ["react", "redbox-react"]
            },           
            ]
          }
        }
      }

if i remove "optimisation.react.constantElements" the webpack build is ok.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions