Skip to content

Commit

Permalink
enable embroider build, downgrade ember due to negative interaction w…
Browse files Browse the repository at this point in the history
  • Loading branch information
22a committed Aug 7, 2021
1 parent b880baf commit 3832787
Show file tree
Hide file tree
Showing 5 changed files with 852 additions and 53 deletions.
2 changes: 1 addition & 1 deletion app/router.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import EmberRouter from '@ember/routing/router';
import EmberRouter from '@embroider/router';
import config from 'ffxiv-meter/config/environment';

export default class Router extends EmberRouter {
Expand Down
3 changes: 3 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"sourceType": "unambiguous"
}
16 changes: 15 additions & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,19 @@ module.exports = function (defaults) {
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.

return app.toTree();
if (process.env.NO_EMBROIDER) {
return app.toTree();
} else {
const { Webpack } = require('@embroider/webpack');
return require('@embroider/compat').compatBuild(app, Webpack, {
staticAddonTestSupportTrees: true,
staticAddonTrees: true,
staticHelpers: true,
staticComponents: true,
splitAtRoutes: ['application'], // can also be a RegExp
packagerOptions: {
// webpackConfig: {},
},
});
}
};
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.2.5",
"@embroider/compat": "^0.43.4",
"@embroider/core": "^0.43.4",
"@embroider/router": "^0.43.4",
"@embroider/webpack": "^0.43.4",
"@fullhuman/postcss-purgecss": "^4.0.3",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
Expand All @@ -47,7 +51,7 @@
"ember-maybe-import-regenerator": "^0.1.6",
"ember-qunit": "^5.1.4",
"ember-resolver": "^8.0.2",
"ember-source": "~3.27.2",
"ember-source": "~3.26.1",
"ember-template-lint": "^3.4.2",
"ember-truth-helpers": "^3.0.0",
"eslint": "^7.27.0",
Expand All @@ -62,7 +66,8 @@
"prettier": "^2.3.0",
"qunit": "^2.15.0",
"qunit-dom": "^1.6.0",
"tailwindcss": "^2.2.7"
"tailwindcss": "^2.2.7",
"webpack": "^5.49.0"
},
"engines": {
"node": "10.* || >= 12"
Expand Down
Loading

0 comments on commit 3832787

Please sign in to comment.