vue-template-global-variable-loader
Installation
npm install -D vue-template-global-variable-loader
webpack Configuration
moduleexports = 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