phegman / vue-mapbox-gl

A Vue.js component for Mapbox GL JS
GNU General Public License v3.0
270 stars 33 forks source link

Problem using Shimming/Universal Import #29

Closed jasonmoore30 closed 6 years ago

jasonmoore30 commented 6 years ago

Hello, The instructions say to add the plugin to webpack.config.js, but I am using Vuetify/webpack-advanced and this file doesn't exist. Does this import need to be in the dev.conf.js and prod.conf.js in this case? I've been experimenting, but nothing I have tried has worked. Let me know if this makes sense or if you need more information. Thanks.

phegman commented 6 years ago

Hey Jason,

This will vary depending on your Webpack setup. In this case I believe you would want to edit /build/webpack.base.conf.js and add:

plugins: [
  new webpack.ProvidePlugin({
    mapboxgl: 'mapbox-gl'
  })
]

Hope that is helpful! Pete