Skip to content

Commit

Permalink
Merge pull request #7595 from jrjohnson/disable-embroider-again
Browse files Browse the repository at this point in the history
Switch off embroider again
  • Loading branch information
stopfstedt authored Feb 2, 2024
2 parents 415c1fd + eaf227d commit e17363d
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 49 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,43 @@ jobs:
- run: firefox --version
- name: test
run: pnpm run test:ember --launch=Firefox

test-with-embroider:
name: Test With Embroider
runs-on: ubuntu-latest
timeout-minutes: 15
env:
BUILD_WITH_EMBROIDER: true
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install
- name: Run Tests
run: pnpm run test:ember

build-with-embroider:
name: Build With Embroider
runs-on: ubuntu-latest
timeout-minutes: 10
env:
BUILD_WITH_EMBROIDER: true
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install
- name: Run Tests
run: pnpm run --filter frontend build
103 changes: 54 additions & 49 deletions packages/frontend/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,56 +61,61 @@ module.exports = function (defaults) {
},
});

return require('@embroider/compat').compatBuild(app, Webpack, {
staticAddonTestSupportTrees: true,
staticAddonTrees: true,
staticHelpers: true,
staticComponents: true,
splitAtRoutes: [
/admin[a-z-]*/,
'assign-students',
/course[a-z-]*/,
/curriculum[a-z-]*/,
'dashboard.activities',
'dashboard.calendar',
'dashboard.materials',
// 'error', don't ever split the error route, it will break error handling
'events',
'four-oh-four',
/instructor[a-z-]*/,
/learner[a-z-]*/,
'login',
'logout',
'myprofile',
'pending-user-updates',
'print-course',
/program[a-z-]*/,
/report[a-z-]*/,
/school[a-z-]*/,
'search',
/session[a-z-]*/,
/user[a-z-]*/,
'verification-preview',
'weeklyevents',
],
packagerOptions: {
webpackConfig: {
plugins: [new RetryChunkLoadPlugin() /*, new BundleAnalyzerPlugin()*/],
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
terserOptions: {
compress: {
passes: 6, // slow, but worth it
inline: 5,
reduce_funcs: false,
if (process.env.BUILD_WITH_EMBROIDER) {
return require('@embroider/compat').compatBuild(app, Webpack, {
staticAddonTestSupportTrees: true,
staticAddonTrees: true,
staticHelpers: true,
staticComponents: true,
splitAtRoutes: [
//temporarily disabled route splitting for https://github.com/ilios/ilios/issues/4508
/admin[a-z-]*/,
'assign-students',
/course[a-z-]*/,
/curriculum[a-z-]*/,
'dashboard.activities',
'dashboard.calendar',
'dashboard.materials',
'error',
'events',
'four-oh-four',
/instructor[a-z-]*/,
/learner[a-z-]*/,
'login',
'logout',
'myprofile',
'pending-user-updates',
'print-course',
/program[a-z-]*/,
/report[a-z-]*/,
/school[a-z-]*/,
'search',
/session[a-z-]*/,
/user[a-z-]*/,
'verification-preview',
'weeklyevents',
],
packagerOptions: {
webpackConfig: {
plugins: [new RetryChunkLoadPlugin() /*, new BundleAnalyzerPlugin()*/],
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
terserOptions: {
compress: {
passes: 6, // slow, but worth it
inline: 5,
reduce_funcs: false,
},
},
},
}),
],
}),
],
},
},
},
},
});
});
} else {
return app.toTree();
}
};

0 comments on commit e17363d

Please sign in to comment.