Open
Description
I just got bitten by that this library needs treeshake disabled
Line 41 in bbaf944
Rollup seems to treeshake too much away, is this a rollup bug?
The commit where treeshaking was disabled is in
33878b5#diff-527d3af57329b4d70ddb9b2ee335f0cb
But it is unclear which code is affected, commit messages mentions
"disable tree shaking as it removes placeholder functions"
import * as FilePond from 'filepond'
import FilePondPluginFileValidateSize from 'filepond-plugin-file-validate-size'
import FilePondPluginImageExifOrientation from 'filepond-plugin-image-exif-orientation'
import FilePondPluginImagePreview from 'filepond-plugin-image-preview'
FilePond.registerPlugin(
FilePondPluginFileValidateSize,
FilePondPluginImageExifOrientation,
FilePondPluginImagePreview
)
FilePond.setOptions({
maxFileSize: '5MB',
server: 'api/'
})
var pond = FilePond.create(document.querySelector('input[type="file"]'))
Summary
Could you provide more details on why treeshaking needs to be disabled?
Consider opening a rollup issue.
How to reproduce
rollup a bundle that imports filepond
Expected behaviour
the bundle should work, i.e. the example code
Additional information
- @babel/preset-env
Environment | Version |
---|---|
OS | MacOS |