Skip to content

Commit

Permalink
patch out included method to make sure equire.resolve is not starti…
Browse files Browse the repository at this point in the history
…ng from the wrong location (ember-cli instead of ember-mapbox-gl) when running with modern package managers
  • Loading branch information
johanrd committed Apr 17, 2023
1 parent 9f10da4 commit d85319e
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,4 @@ module.exports = {
plugins: [require.resolve('ember-auto-import/babel-plugin')],
},
},

included(app) {
this._super.included.apply(this, arguments);

const path = require('path');
const mapboxPkg = require(require.resolve('mapbox-gl/package.json', {
paths: [app.project.root],
}));
const stylesPath = require.resolve(`mapbox-gl/${mapboxPkg.style}`, {
paths: [app.project.root],
});

app.import(path.relative(app.project.root, stylesPath));
},
};

0 comments on commit d85319e

Please sign in to comment.