Skip to content

@formatjs is not working with fast boot #791

@gedaiu

Description

@gedaiu

It looks like fat boot it is not working with the latest @formatjs poyfills. Is there a workaroun this? everything works fine if I don't run fastboot.

ember-cli-build.js

...
babel: {
      plugins: [ require.resolve('ember-auto-import/babel-plugin'), "transform-optional-chaining" ]
    }
...

App is being served by FastBoot
/tmp/broccoli-130391zwtRy0DpAwx/out-618-append_ember_auto_import_analyzer/assets/vendor.js:141913
      return formatterInstance.format(value, formatOptions?.unit ?? formatterOptions.unit);
                                                           ^

SyntaxError: Unexpected token '.'
    at new Script (vm.js:88:7)
    at VMSandbox.eval (/home/gedaiu/workspace/gis-collective/frontend/web-frontend/node_modules/fastboot/src/vm-sandbox.js:13:22)
    at /home/gedaiu/workspace/gis-collective/frontend/web-frontend/node_modules/fastboot/src/ember-app.js:190:15
    at Array.forEach (<anonymous>)
    at EmberApp.loadAppFiles (/home/gedaiu/workspace/gis-collective/frontend/web-frontend/node_modules/fastboot/src/ember-app.js:187:21)
    at EmberApp.retrieveSandboxedApp (/home/gedaiu/workspace/gis-collective/frontend/web-frontend/node_modules/fastboot/src/ember-app.js:235:10)
    at new EmberApp (/home/gedaiu/workspace/gis-collective/frontend/web-frontend/node_modules/fastboot/src/ember-app.js:61:21)
    at FastBoot._buildEmberApp (/home/gedaiu/workspace/gis-collective/frontend/web-frontend/node_modules/fastboot/src/index.js:114:17)
    at new FastBoot (/home/gedaiu/workspace/gis-collective/frontend/web-frontend/node_modules/fastboot/src/index.js:52:10)
    at /home/gedaiu/workspace/gis-collective/frontend/web-frontend/node_modules/ember-cli-fastboot/index.js:335:29
    at Layer.handle [as handle_request] (/home/gedaiu/workspace/gis-collective/frontend/web-frontend/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/gedaiu/workspace/gis-collective/frontend/web-frontend/node_modules/express/lib/router/index.js:317:13)
    at /home/gedaiu/workspace/gis-collective/frontend/web-frontend/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/gedaiu/workspace/gis-collective/frontend/web-frontend/node_modules/express/lib/router/index.js:335:12)
    at next (/home/gedaiu/workspace/gis-collective/frontend/web-frontend/node_modules/express/lib/router/index.js:275:10)
    at /home/gedaiu/workspace/gis-collective/frontend/web-frontend/node_modules/ember-cli/lib/tasks/server/middleware/broccoli-watcher/index.js:54:11

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