Skip to content

Commit 87076b4

Browse files
committed
feat: remove module aliases to fix output
1 parent e4b1fd5 commit 87076b4

15 files changed

+12
-44
lines changed

dts.config.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
1-
const alias = require('@rollup/plugin-alias');
2-
const resolve = require('@rollup/plugin-node-resolve').nodeResolve;
31
const analyze = require('rollup-plugin-analyzer');
4-
const path = require('path');
52

6-
const customResolver = resolve({
7-
extensions: ['.mjs', '.js', '.json', '.ts'],
8-
});
9-
const projectRootDir = path.resolve(__dirname);
10-
11-
const plugins = [
12-
alias({
13-
entries: [{ find: '@', replacement: path.resolve(projectRootDir, 'src') }],
14-
customResolver,
15-
}),
16-
resolve(),
17-
analyze(),
18-
];
3+
const plugins = [analyze()];
194

205
module.exports = {
216
rollup(config, options) {

jest.config.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
/** @type {import('@jest/types').Config.InitialOptions} */
22
const config = {
33
verbose: true,
4-
moduleNameMapper: {
5-
'@/(.*)': '<rootDir>/src/$1',
6-
},
7-
moduleFileExtensions: ['js', 'json', 'ts'],
84
setupFilesAfterEnv: ['<rootDir>/test/setup.ts'],
95
};
106

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
"analyze": "size-limit --why"
2626
},
2727
"devDependencies": {
28-
"@rollup/plugin-alias": "^3.1.9",
29-
"@rollup/plugin-node-resolve": "^13.1.3",
3028
"@size-limit/preset-small-lib": "^7.0.8",
3129
"@types/humps": "^2.0.1",
3230
"dts-cli": "^1.4.0",

src/sdk/v4/_fetcher.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fetch from 'cross-fetch';
22
import { camelizeKeys, decamelizeKeys } from 'humps';
3-
import stringify from '@/utils/qs-stringify';
4-
import { removeBeginningSlash } from '@/utils/misc';
3+
import stringify from '../../utils/qs-stringify';
4+
import { removeBeginningSlash } from '../../utils/misc';
55

66
export const API_BASE_URL = 'https://api.quran.com/api/v4/';
77

src/sdk/v4/audio.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
RubNumber,
1111
VerseKey,
1212
VerseRecitationField,
13-
} from '@/types';
13+
} from '../../types';
1414
import { decamelize } from 'humps';
1515
import Utils from '../utils';
1616
import { fetcher } from './_fetcher';

src/sdk/v4/chapters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Chapter, ChapterId, ChapterInfo, Language } from '@/types';
1+
import { Chapter, ChapterId, ChapterInfo, Language } from '../../types';
22
import { fetcher } from './_fetcher';
33
import Utils from '../utils';
44

src/sdk/v4/juzs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Juz } from '@/types';
1+
import { Juz } from '../../types';
22
import { fetcher } from './_fetcher';
33

44
/**

src/sdk/v4/resources.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
// TranslationInfoResource,
1212
TranslationResource,
1313
VerseMediaResource,
14-
} from '@/types';
14+
} from '../../types';
1515
import { fetcher } from './_fetcher';
1616

1717
type GetResourcesOptions = Partial<{

src/sdk/v4/search.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Language, SearchResponse } from '@/types';
1+
import { Language, SearchResponse } from '../../types';
22
import { fetcher } from './_fetcher';
33

44
type SearchOptions = Partial<{

src/sdk/v4/verses.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
VerseField,
1111
VerseKey,
1212
WordField,
13-
} from '@/types';
13+
} from '../../types';
1414
import { decamelize } from 'humps';
1515
import Utils from '../utils';
1616
import { fetcher } from './_fetcher';

0 commit comments

Comments
 (0)