Skip to content

Commit 1792eb5

Browse files
authored
Fixes rollup config for bundling (#40)
* Fixes rollup config for bundling * Adds bundle directory to eslint ignores * Ignores bundle directory in prettier and jest
1 parent 3c8d7ee commit 1792eb5

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Ignore build output directories
22
build/
33
dist/
4+
bundle/
45

56
# Ignore node modules
67
node_modules/

eslint.config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import ts from 'typescript-eslint';
66

77
export default [
88
{
9-
ignores: ['node_modules', 'dist', 'src/generated'],
9+
ignores: ['node_modules', 'dist', 'src/generated', 'bundle'],
1010
},
1111

1212
{

jest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ module.exports = {
1212
coverageDirectory: 'coverage',
1313
coverageReporters: ['json', 'lcov', 'text', 'clover'],
1414
coveragePathIgnorePatterns: ['<rootDir>/src/generated/'],
15-
testPathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/node_modules/'],
15+
testPathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/node_modules/', '<rootDir>/bundle/'],
1616
};

rollup.config.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ export default {
66
input: 'dist/index.js',
77
output: {
88
file: 'bundle/index.js',
9-
format: 'cjs', // CommonJS module format
9+
format: 'esm',
1010
sourcemap: true,
11-
exports: 'named',
1211
},
1312
plugins: [
1413
resolve(), // helps Rollup find node_modules packages

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "ES6",
3+
"target": "ESNext",
44
"module": "NodeNext",
55
"moduleResolution": "nodenext",
66
"declaration": true,

0 commit comments

Comments
 (0)