We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
iife
Describe the issue Add support minified iife format.
Solution
packge.json Add postbuild command
postbuild
"scripts": { ..., "postbuild": "BUILD_MINIFY=true rollup --config" ..., }
rollup.config.js Install package terser & modify the rollup config.
terser
import babel from 'rollup-plugin-babel'; import { terser } from 'rollup-plugin-terser'; const isMinify = process.env.BUILD_MINIFY ? true : false; let output = [ { file: 'dist/react-paginating.cjs.js', name: 'react-paginating-cjs', format: 'cjs' }, { file: 'dist/react-paginating.esm.js', name: 'react-paginating-esm', format: 'esm' }, { file: 'dist/react-paginating.umd.js', name: 'react-paginating-umd', format: 'umd', sourcemap: true }, ]; if (isMinify) { output = { file: 'dist/react-paginating.umd.min.js', name: 'react-paginating.umd.min', format: 'iife', sourcemap: true }; } export default [{ input: 'src/Pagination/index.js', output, plugins: [ babel({ exclude: 'node_modules/**' }), isMinify ? terser() : null ] }];
The text was updated successfully, but these errors were encountered:
released at version 1.2.1
Sorry, something went wrong.
No branches or pull requests
Describe the issue
Add support minified
iife
format.Solution
packge.json
Add
postbuild
commandrollup.config.js
Install package
terser
& modify the rollup config.The text was updated successfully, but these errors were encountered: