Skip to content

Commit

Permalink
docs: document library external globals
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 20, 2021
1 parent 6d06ec0 commit 0633dab
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion docs/guide/build.md
Expand Up @@ -97,7 +97,16 @@ module.exports = {
name: 'MyLib'
},
rollupOptions: {
external: ['vue']
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ['vue'],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: 'Vue'
}
}
}
}
}
Expand Down

0 comments on commit 0633dab

Please sign in to comment.