-
-
Notifications
You must be signed in to change notification settings - Fork 154
Use Rollup for bundling dependencies #242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
sindresorhus
merged 16 commits into
sindresorhus:main
from
tommy-mitchell:refactor-bundle-deps
Aug 16, 2023
Merged
Changes from 3 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
0c55a85
feat: use Rollup for bundling
tommy-mitchell 9ad34ca
Merge branch 'main' into refactor-bundle-deps
tommy-mitchell ce2954b
chore(`rollup`): use `terser`, handle licenses
tommy-mitchell 5040a61
* add `_actualDependencies` to `package.json`
tommy-mitchell 78a7386
remove unused plugins, strip dependency comments
tommy-mitchell 334a5d9
resolve suggestions
tommy-mitchell 74784f4
add bundle tests
tommy-mitchell 9e12abf
consolidate build tests
tommy-mitchell bc310ad
Merge branch 'main' into refactor-bundle-deps
tommy-mitchell aed54ab
remove empty `node:` imports from build
tommy-mitchell 485ffad
fix removing comments from deps bundle
tommy-mitchell 93d281b
fix failing test from `common-tags` update
tommy-mitchell 6b70464
glob input
tommy-mitchell b8b7130
Update build.js
sindresorhus 8bdc9e3
Update build.js
sindresorhus e8455db
Update build.js
sindresorhus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| node_modules | ||
| dist | ||
| yarn.lock |
This file contains hidden or 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 hidden or 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,38 @@ | ||
| import json from '@rollup/plugin-json'; | ||
| import commonjs from '@rollup/plugin-commonjs'; | ||
| import {nodeResolve} from '@rollup/plugin-node-resolve'; | ||
| import license from 'rollup-plugin-license'; | ||
| import terser from '@rollup/plugin-terser'; | ||
| import filesize from 'rollup-plugin-filesize'; | ||
| import {defineConfig} from 'rollup'; | ||
|
|
||
| export default defineConfig({ | ||
| input: 'source/index.js', | ||
| output: { | ||
| file: 'dist/index.js', | ||
| // https://rollupjs.org/configuration-options/#output-interop | ||
| interop: 'esModule', | ||
| // https://rollupjs.org/configuration-options/#output-generatedcode | ||
| generatedCode: { | ||
| preset: 'es2015', | ||
| }, | ||
| }, | ||
| plugins: [ | ||
| json(), | ||
| commonjs(), | ||
| nodeResolve(), | ||
| license({ | ||
| thirdParty: { | ||
| output: 'dist/dependencies.md', | ||
| }, | ||
| }), | ||
| terser({ | ||
| module: true, | ||
| toplevel: true, | ||
| format: { | ||
| comments: false, | ||
| }, | ||
| }), | ||
| filesize(), | ||
| ], | ||
| }); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.