From 0cafbae3ca926ba33948ac8495c6b5dd0329e0f3 Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Fri, 29 Sep 2023 15:25:36 -0700 Subject: [PATCH] Enable embroider Tests are passing and everything appears to be working, let's turn this on and see how it works. --- .github/workflows/ci.yml | 30 ------------ ember-cli-build.js | 103 +++++++++++++++++++-------------------- 2 files changed, 49 insertions(+), 84 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5eaf5084e0..6ea3b30252 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,36 +74,6 @@ jobs: - name: test build run: npm run build - 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: actions/setup-node@v4 - with: - node-version: 18.17 - cache: npm - - run: npm ci - - run: npm 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: actions/setup-node@v4 - with: - node-version: 18.17 - cache: npm - - run: npm ci - - run: npm run build - browserstack-test: name: Browserstack ${{ matrix.launcher }} runs-on: ubuntu-latest diff --git a/ember-cli-build.js b/ember-cli-build.js index f8c61cb843..5f386fb6d1 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -61,61 +61,56 @@ module.exports = function (defaults) { }, }); - 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, - }, + 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', + '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(); - } + }, + }); };