fusionjs / fusionjs

Modern framework for fast, powerful React apps
https://fusionjs.com
MIT License
1.54k stars 136 forks source link

fusion test --dir ignores babel.config #638

Open yogurtandjam opened 4 years ago

yogurtandjam commented 4 years ago

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

rtsao commented 4 years ago

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

yogurtandjam commented 4 years ago

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

gergelyke commented 4 years ago

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

yogurtandjam commented 4 years ago

@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