fusionjs icon indicating copy to clipboard operation
fusionjs copied to clipboard

fusion test --dir ignores babel.config

Open yogurtandjam opened this issue 6 years ago • 4 comments

Running fusion test --dir throws errors on proposals that we are including in our babel.config

current babel.config

module.exports = {
  plugins: [
    '@babel/plugin-transform-flow-strip-types',
    '@babel/plugin-proposal-optional-chaining',
    '@babel/plugin-proposal-object-rest-spread',
    '@babel/plugin-syntax-dynamic-import',
    '@babel/plugin-proposal-json-strings',
    ['@babel/plugin-proposal-class-properties', { loose: false }],
  ],
  presets: [
    [
      '@babel/preset-env',
      {
        targets: {
          browsers: ['last 2 Chrome versions'],
          node: '8.9',
        },
        include: ['transform-block-scoping', 'transform-destructuring'],
      },
    ],
    '@babel/preset-react',
  ],
};

error message

 SyntaxError: /Users/ljeremy/Uber/epudos-editor/src/records/epudo.js: Support for the experimental syntax 'optionalChaining' isn't currently enabled (226:34):

This only occurs when using the --dir flag. Running yarn fusion test operates just fine

yogurtandjam avatar Aug 16 '19 20:08 yogurtandjam

I suspect this is a cwd-related issue. We probably are using relative paths somewhere where we need to use fully-resolved paths.

rtsao avatar Sep 03 '19 17:09 rtsao

should i look into this and try to open a PR? or is this something the team will likely take on soon

yogurtandjam avatar Sep 04 '19 17:09 yogurtandjam

@yogurtandjam is this still something that's an issue on your end? if so, are you still open for working on it?

gergelyke avatar Jul 22 '20 18:07 gergelyke

@gergelyke hey there, i'm open to working on it, i'm a little busy with other things but definitely happy to investigate on my own

yogurtandjam avatar Aug 03 '20 14:08 yogurtandjam