Skip to content

Instantly share code, notes, and snippets.

@hasangenc0
Last active June 14, 2021 12:29
Show Gist options
  • Save hasangenc0/3853927bfa7809d4796ce0c147df35ce to your computer and use it in GitHub Desktop.
Save hasangenc0/3853927bfa7809d4796ce0c147df35ce to your computer and use it in GitHub Desktop.
import externalGlobals from 'rollup-plugin-external-globals';
const externals = {
react: 'React',
'react-dom': 'ReactDOM',
axios: 'axios',
};
export default defineConfig({
...
plugins: [
legacy({
targets: {
ie: '11'
},
polyfills: ['es/promise', /* ... */],
additionalLegacyPolyfills: ['regenerator-runtime/runtime']
}),
externalGlobals(externals),
]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment