Skip to content

Instantly share code, notes, and snippets.

@AaronFlower
Last active December 6, 2017 14:08
Show Gist options
  • Save AaronFlower/4437d47af73cb7b302d90811dea14d4d to your computer and use it in GitHub Desktop.
Save AaronFlower/4437d47af73cb7b302d90811dea14d4d to your computer and use it in GitHub Desktop.
expose-loader 暴露全局变量到宿主环境上
{
module: {
rules: [{
test: path.resolve(__dirname, '../pdmp/scripts/lib/jquery-1.12.4.js'),
use: [{
loader: 'expose-loader',
options: '$'
},
{
loader: 'expose-loader',
options: 'jQuery'
}
]
}]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment