Skip to content

Commit e3e4930

Browse files
authored
feat: enable embroider-optimized scenario (#2703)
1 parent 8088e5b commit e3e4930

File tree

7 files changed

+373
-897
lines changed

7 files changed

+373
-897
lines changed

packages/components/package.json

Lines changed: 75 additions & 75 deletions
Large diffs are not rendered by default.

packages/components/rollup.config.mjs

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { babel } from '@rollup/plugin-babel';
88
import copy from 'rollup-plugin-copy';
99
import scss from 'rollup-plugin-scss';
1010
import process from 'process';
11+
import path from 'node:path';
1112

1213
const addon = new Addon({
1314
srcDir: 'src',
@@ -27,13 +28,22 @@ const plugins = [
2728
// These are the modules that should get reexported into the traditional
2829
// "app" tree. Things in here should also be in publicEntrypoints above, but
2930
// not everything in publicEntrypoints necessarily needs to go here.
30-
addon.appReexports([
31-
'components/**/!(*types).js',
32-
'helpers/**/*.js',
33-
'modifiers/**/*.js',
34-
'services/**/!(*types).js',
35-
'instance-initializers/**/*.js',
36-
]),
31+
addon.appReexports(
32+
[
33+
'components/**/!(*types).js',
34+
'helpers/**/*.js',
35+
'modifiers/**/*.js',
36+
'services/**/!(*types).js',
37+
'instance-initializers/**/*.js',
38+
],
39+
{
40+
mapFilename: (filename) => {
41+
if (filename.endsWith('/index.js')) {
42+
return path.dirname(filename) + '.js';
43+
}
44+
},
45+
}
46+
),
3747

3848
// Follow the V2 Addon rules about dependencies. Your code can import from
3949
// `dependencies` and `peerDependencies` as well as standard Ember-provided

pnpm-lock.yaml

Lines changed: 274 additions & 811 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

showcase/config/ember-try.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module.exports = async function () {
7878
},
7979
},
8080
embroiderSafe(),
81-
embroiderOptimized({ allowedToFail: true }),
81+
embroiderOptimized(),
8282
],
8383
};
8484
};

showcase/ember-cli-build.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ module.exports = function (defaults) {
4343
{
4444
package: 'qunit',
4545
},
46+
{
47+
package: '@hashicorp/flight-icons',
48+
},
4649
],
4750
});
4851
};

showcase/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"@ember/string": "^4.0.1",
4747
"@ember/test-helpers": "^5.2.1",
4848
"@ember/test-waiters": "^3.1.0",
49-
"@embroider/macros": "^1.18.0",
49+
"@embroider/macros": "^1.18.1",
5050
"@embroider/test-setup": "^4.0.0",
5151
"@eslint/js": "^9.27.0",
5252
"@glimmer/component": "^1.1.2",

website/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
"@ember/render-modifiers": "^2.1.0",
4949
"@ember/string": "^4.0.1",
5050
"@ember/test-helpers": "^5.2.1",
51-
"@embroider/macros": "^1.18.0",
52-
"@embroider/util": "^1.13.2",
51+
"@embroider/macros": "^1.18.1",
52+
"@embroider/util": "^1.13.4",
5353
"@eslint/js": "^9.27.0",
5454
"@glimmer/component": "^1.1.2",
5555
"@glimmer/tracking": "^1.1.2",

0 commit comments

Comments
 (0)