1.0.1 • Published 5 years ago
vue-template-global-variable-loader v1.0.1
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