vue-template-global-variable-loader
v1.0.1
Published
support vue template to use window/location/document variable
Downloads
13
Maintainers
Readme
vue-template-global-variable-loader
Installation
npm install -D vue-template-global-variable-loader
webpack Configuration
module.exports = {
module: {
rules: [
// ... other rules
{
test: /\.vue$/,
resourceQuery: /type=template/,
enforce: 'post',
loader: 'vue-template-global-variable-loader',
options: {
variables: ['window', 'location', 'document', '_'] // add global variable as you want
}
}
]
}
}
License
MIT