-
-
Save javan/b05031b4f77851dd80a6e69495f5888a to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
set -e | |
TMP_DIR="/tmp/stimulus-polyfills" | |
OUT_FILE="$(pwd)/stimulus-polyfills.js" | |
mkdir -p "$TMP_DIR" | |
cd "$TMP_DIR" | |
echo "--- Installing dependencies" | |
npm install --save-dev rollup rollup-plugin-node-resolve rollup-plugin-commonjs @stimulus/polyfills 2>/dev/null | |
echo "--- Building" | |
cat << EOF > ./rollup.config.js | |
import resolve from "rollup-plugin-node-resolve" | |
import commonjs from "rollup-plugin-commonjs" | |
export default { | |
input: "node_modules/@stimulus/polyfills/index.js", | |
output: { | |
file: "$OUT_FILE", | |
format: "iife" | |
}, | |
plugins: [ | |
resolve(), | |
commonjs() | |
] | |
} | |
EOF | |
./node_modules/.bin/rollup -c rollup.config.js | |
rm -rf "$TMP_DIR" | |
echo | |
echo "Done!" |
Author
javan
commented
Apr 30, 2019
Hi, I have this issue with internet Explorer 11 and i have a gulpfile that manages my client side data bundle. But I am unable to integrate the polyfills in it. Can you help?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment