Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack Production - gulp-uglify fails #4

Closed
lukepolo opened this issue Dec 29, 2016 · 16 comments
Closed

Webpack Production - gulp-uglify fails #4

lukepolo opened this issue Dec 29, 2016 · 16 comments

Comments

@lukepolo
Copy link
Contributor

For some reason the gulp-uglify fails when trying to import this package :

SyntaxError: Unexpected token punc «,», expected punc «:»',

I've dug through the source code and didn't see anything wrong. (could be my webpack config is bad as well)

@Akryum
Copy link
Owner

Akryum commented Dec 29, 2016

Well, more details of your configuration would be great! :)

@lukepolo
Copy link
Contributor Author

// ensure we are using the version of Vue that supports templates
    resolve: {
      alias: {
        vue: 'vue/dist/vue.js'
      }
    },
    // use buble loader since it is the default in Elixir
    vue: {
      loaders: {
        js: 'buble-loader'
      }
    },
    module: {
      loaders: [
       {
                test: /\.js$/,
                loader: 'buble', 
               exclude: /node_modules/ 
        },
        {
          test: /\.vue$/,
          loader: 'vue-loader'
        },
        {
          test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
          loader: 'file-loader',
          query: {
            limit: 10000,
            name: '../img/[name].[hash:7].[ext]'
          }
        },
        {
          test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
          loader: 'url-loader',
          query: {
            limit: 10000,
            name: '../fonts/[name].[hash:7].[ext]'
          }
        }
      ]
    }

Seems to work ok with everything else

@Akryum
Copy link
Owner

Akryum commented Dec 29, 2016 via email

@lukepolo
Copy link
Contributor Author

I did :-( , that was my first go to see if it was just the compiled version , but ends with same results

@Akryum
Copy link
Owner

Akryum commented Dec 29, 2016 via email

@lukepolo
Copy link
Contributor Author

I have not , will give a go

@Akryum
Copy link
Owner

Akryum commented Dec 29, 2016 via email

@lukepolo
Copy link
Contributor Author

Yah even babel didn't like it

@Akryum
Copy link
Owner

Akryum commented Dec 29, 2016

By the way, try commenting the line with exclude node_modules in the js rule.

@lukepolo
Copy link
Contributor Author

A bit of a different error when doing that

message: '/home/vagrant/Code/pm/app.js: SyntaxError: Unexpected token: operator (>)',

But assuming not all things should be ran through the babel-loader at that point

@Akryum
Copy link
Owner

Akryum commented Dec 29, 2016 via email

@lukepolo
Copy link
Contributor Author

import VTooltip from './../../../node_modules/v-tooltip/dist/v-tooltip' Vue.use(VTooltip)

This appears (not a minify issue)
Can\'t resolve \'Tooltip\' i

@Akryum
Copy link
Owner

Akryum commented Dec 29, 2016 via email

@Akryum
Copy link
Owner

Akryum commented Jan 3, 2017

Could you try with the latest version of v-tooltip please?

@kiwina
Copy link

kiwina commented Feb 27, 2017

Webpack still trows error with c => whe i import the source
but works with
import VTooltip from 'v-tooltip'
Vue.use(VTooltip)

@Akryum
Copy link
Owner

Akryum commented Mar 13, 2017

Closing since it seems to work with:

import VTooltip from 'v-tooltip'
Vue.use(VTooltip)

@Akryum Akryum closed this as completed Mar 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants