pzuraq / macro-decorators

Decorators for getter/setter macros!
https://pzuraq.github.io/macro-decorators/
MIT License
62 stars 10 forks source link

Exports not found in embroider production build #25

Open markusm7 opened 3 years ago

markusm7 commented 3 years ago

When using this library in an ember embroider app we get following warnings export 'alias' (imported as 'alias') was not found in 'macro-decorators' (possible exports: __esModule) for every import we make from macro-decorators. It doesnt matter if those imports are in an addon we consume, or we import them directly in our app. Those warnings lead to errors in the application because the exports in the output builds are not correct. (e.g. exports is undefined)

Does anybody have ideas or encountered similar issues? There are similar warnings in the build for glimmer component and ember inflector, but from those we didnt encounter errors in the app (yet)

Embroider config in ember-cli-build:

  return require('@embroider/compat').compatBuild(app, Webpack, {
    staticAddonTestSupportTrees: true,
    staticAddonTrees: true,
    staticHelpers: true,
    // staticComponents: true,
    packagerOptions: {
      webpackConfig: {},
    },
    splitAtRoutes: ['some-route'],
  });
markusm7 commented 3 years ago

This seems to be only the case if the build target includes ie11, maybe a problem with webpack