forked from ianstormtaylor/superstruct
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This replaces Rollup with `tsup`, using the config from the module template.
- Loading branch information
Showing
8 changed files
with
403 additions
and
2,084 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/dist/index.js b/dist/index.js | ||
index 4500c4e43c3bbd24aa60b7d4cf95aa3fee8eb185..9c442bc216f99b7cfadb5ac62cb98d3ae9ce2f56 100644 | ||
--- a/dist/index.js | ||
+++ b/dist/index.js | ||
@@ -1813,6 +1813,8 @@ var cjsSplitting = () => { | ||
} | ||
const { transform: transform3 } = await Promise.resolve().then(() => require("sucrase")); | ||
const result = transform3(code, { | ||
+ // https://github.com/egoist/tsup/issues/1087 | ||
+ disableESTransforms: true, | ||
filePath: info.path, | ||
transforms: ["imports"], | ||
sourceMapOptions: this.options.sourcemap ? { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"declaration": true, | ||
"declarationMap": true, | ||
"emitDeclarationOnly": true, | ||
"inlineSources": true, | ||
"noEmit": false, | ||
"outDir": "dist/types", | ||
"rootDir": "src", | ||
"sourceMap": true | ||
}, | ||
"include": ["./src/**/*.ts"], | ||
"exclude": [ | ||
"./src/**/__fixtures__/**/*", | ||
"./src/**/__mocks__/**/*", | ||
"./src/**/__test__/**/*", | ||
"./src/**/__tests__/**/*", | ||
"./src/**/__snapshots__/**/*", | ||
"./src/**/*.test.ts", | ||
"./src/**/*.test-d.ts", | ||
"./src/**/*.test.*.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { defineConfig } from 'tsup'; | ||
|
||
export default defineConfig({ | ||
// The entry to bundle. | ||
entry: [ | ||
'src/**/*.ts', | ||
'!src/**/__fixtures__/**/*', | ||
'!src/**/__mocks__/**/*', | ||
'!src/**/__test__/**/*', | ||
'!src/**/__tests__/**/*', | ||
'!src/**/__snapshots__/**/*', | ||
'!src/**/*.test.ts', | ||
'!src/**/*.test-d.ts', | ||
'!src/**/*.test.*.ts', | ||
], | ||
|
||
// The output formats. We want to generate both CommonJS and ESM bundles. | ||
// https://tsup.egoist.dev/#bundle-formats | ||
format: ['cjs', 'esm'], | ||
|
||
// Generate sourcemaps as separate files. | ||
// https://tsup.egoist.dev/#generate-sourcemap-file | ||
sourcemap: true, | ||
|
||
// Clean the dist folder before bundling. | ||
clean: true, | ||
|
||
// Hide unnecessary logs from the console. Warnings and errors will still be | ||
// shown. | ||
silent: true, | ||
|
||
// Split the output into chunks. This is useful for tree-shaking. | ||
// https://tsup.egoist.dev/#code-splitting | ||
splitting: true, | ||
}); |
Oops, something went wrong.