data icon indicating copy to clipboard operation
data copied to clipboard

feat: Improve config handling for polyfillUUID for 4.12+

Open Techn1x opened this issue 2 years ago • 1 comments

Initial discussion was here; https://github.com/emberjs/data/pull/8664

we should align the config to the others so that we don't have to make folks do this. For all the other configs we just copy-forward into the appropriate packages from the emberData config, including setting up macros configs when needed.

Rather than editing the Readme to indicate how to do the polyfillUUID config correctly, we can instead improve how the config is handled so that it's not necessary.


It was suggested to backport this to 4.12. If it's easy enough, I would also hope it can be backported to 4.8, otherwise there will be folks moving to 4.8 who won't know that they need to install @embroider/macros and @ember-data/store for the polyfillUUID config to work.

Techn1x avatar Jul 06 '23 02:07 Techn1x

Using the config:

    '@embroider/macros': {
      setConfig: {
        '@ember-data/store': {
          polyfillUUID: true,
        },
      },
    },

In a brand new pnpm app results in unable to resolve package @ember-data/store.

Steps:

  • ember new pnpm-app --pnpm
  • pnpm install -D @embroider/macros
  • Add config to ember-cli-build.js
  • Run: pnpm run test:ember

jrjohnson avatar Oct 30 '23 23:10 jrjohnson