cristijora / vue-tabs

Simplified bootstrap tabs
https://cristijora.github.io/vue-tabs/#/
MIT License
251 stars 72 forks source link

Compile error with webpack 2 (laravel-mix) #42

Closed bradleybensmith closed 6 years ago

bradleybensmith commented 6 years ago

I keep getting a build error with building for prod (it worked fine for dev):

ERROR in ./node_modules/vue-nav-tabs/dist/vue-tabs.common.js
Module build failed: Error: Couldn't find preset "vue-app" relative to directory "D:\\REMOVED\\node_modules\\vue-nav-tabs"
    at D:\REMOVED\node_modules\babel-core\lib\transformation\file\options\option-manager.js:293:19

I'm using it as instructed:

import VueNavTabs from 'vue-nav-tabs'
Vue.use(VueNavTabs)

I removed this from the package.json, and then the prod build worked fine:

  "babel": {
    "presets": [
      [
        "vue-app",
        {
          "useBuiltIns": true
        }
      ]
    ]
  },

Any better suggestions?

cristijora commented 6 years ago

Hello @bram1028 Try to import the es5 file directly from node_modules like this import VueNavTabs from 'vue-nav-tabs/dist/vue-tabs.common.js and see if that works

bradleybensmith commented 6 years ago

Looks like it's something in my webpack config, still narrowing it down.