mirror of
https://github.com/iconify/iconify.git
synced 2025-02-04 13:08:26 +00:00
Fix generated exports by library-builder package
This commit is contained in:
parent
f86317c7bf
commit
696658fb38
@ -3,7 +3,6 @@ module.exports = {
|
|||||||
browser: true,
|
browser: true,
|
||||||
es6: true,
|
es6: true,
|
||||||
node: true,
|
node: true,
|
||||||
mocha: true,
|
|
||||||
},
|
},
|
||||||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
|
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
|
||||||
globals: {
|
globals: {
|
||||||
|
@ -25,7 +25,9 @@ export async function updatePackageJSON(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Get all exports
|
// Get all exports
|
||||||
const data: Record<string, ExportRecord> = {};
|
const data: Record<string, ExportRecord | string> = {
|
||||||
|
'./*': './*',
|
||||||
|
};
|
||||||
if (packageData.main && packageData.module) {
|
if (packageData.main && packageData.module) {
|
||||||
data['./'] = {
|
data['./'] = {
|
||||||
require: formatExport(packageData.main),
|
require: formatExport(packageData.main),
|
||||||
@ -44,11 +46,7 @@ export async function updatePackageJSON(
|
|||||||
const dirKey = parts.join('/');
|
const dirKey = parts.join('/');
|
||||||
dirKeys.add(dirKey);
|
dirKeys.add(dirKey);
|
||||||
|
|
||||||
// Add entries for './foo' and './foo/' in addition to './foo/index' added below
|
// Add entry for './foo' in addition to './foo/index' added below
|
||||||
data[dirKey + '/'] = {
|
|
||||||
require: key + '.js',
|
|
||||||
import: key + '.mjs',
|
|
||||||
};
|
|
||||||
if (!data[dirKey]) {
|
if (!data[dirKey]) {
|
||||||
// Do not overwrite entry added as file
|
// Do not overwrite entry added as file
|
||||||
data[dirKey] = {
|
data[dirKey] = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user