-
Notifications
You must be signed in to change notification settings - Fork 26
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
Remove ts-interface checking, add stats HTML, modern target #70
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,3 +62,5 @@ typings/ | |
|
||
dist/ | ||
typedocs/ | ||
.DS_store | ||
stats*.html |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,20 +2,32 @@ import resolve from '@rollup/plugin-node-resolve'; | |
import commonjs from '@rollup/plugin-commonjs'; | ||
import typescript from 'rollup-plugin-typescript2'; | ||
import { terser } from 'rollup-plugin-terser'; | ||
import visualizer from 'rollup-plugin-visualizer'; | ||
|
||
const commonPlugins = () => [typescript({ useTsconfigDeclarationDir: true, objectHashIgnoreUnknownHack: true, }), commonjs(), resolve()]; | ||
|
||
|
||
export default [ | ||
{ | ||
input: { zarr: 'src/zarr.ts', core: 'src/zarr-core.ts' }, | ||
output: { | ||
output: [{ | ||
dir: 'dist/', | ||
format: 'es', | ||
entryFileNames: '[name].mjs', | ||
sourcemap: true, | ||
}, | ||
{ | ||
dir: 'dist/', | ||
format: 'es', | ||
entryFileNames: '[name].min.mjs', | ||
sourcemap: true, | ||
plugins: [terser()] | ||
}, | ||
], | ||
watch: { | ||
include: 'src/**', | ||
}, | ||
plugins: [typescript({ useTsconfigDeclarationDir: true }), commonjs(), resolve()], | ||
plugins: [...commonPlugins(), visualizer({filename: "stats.html"}), visualizer({filename: "stats.min.html", sourcemap: true})], | ||
}, | ||
{ | ||
input: 'src/zarr.ts', | ||
|
@@ -31,13 +43,7 @@ export default [ | |
}, | ||
], | ||
plugins: [ | ||
typescript({ | ||
useTsconfigDeclarationDir: true, | ||
// https://github.com/ezolenko/rollup-plugin-typescript2/issues/105 | ||
objectHashIgnoreUnknownHack: true, | ||
}), | ||
commonjs(), | ||
resolve(), | ||
...commonPlugins() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: no need to spread, just |
||
], | ||
}, | ||
]; |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can
plugins === commonPlugins()
here andoutput[0].plugins === [ visualizer({filename: "stats.html"}) ]
andoutput[1].plugins === [ terser(), visualizer({filename: "stats.min.html", sourcemap: true }) ]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The visualizer plugin didn't want to be an output plugin so I had to use this workaround
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, not a big deal :)