Skip to content

Commit

Permalink
fix(ember): v2 addons may *not* be type=modules, but still ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Feb 5, 2022
1 parent 29a0a50 commit ae2c319
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion configs/ember.js
Expand Up @@ -123,7 +123,8 @@ const typeDeclarations = {
const { baseConfig, baseModulesConfig } = require('./node');

const packagePath = require.resolve(process.cwd() + '/package.json');
const isModules = require(packagePath).type === 'module';
const packageJson = require(packagePath);
const isModules = packageJson.type === 'module' || packageJson['ember-addon']?.version === 2;
const nodeFiles = [
'./*.js',
'./blueprints/*/index.js',
Expand Down

0 comments on commit ae2c319

Please sign in to comment.