{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/elixir/issues/620","repository_url":"https://api.github.com/repos/laravel/elixir","labels_url":"https://api.github.com/repos/laravel/elixir/issues/620/labels{/name}","comments_url":"https://api.github.com/repos/laravel/elixir/issues/620/comments","events_url":"https://api.github.com/repos/laravel/elixir/issues/620/events","html_url":"https://github.com/laravel/elixir/issues/620","id":173400288,"number":620,"title":"Error while `gulp --production` with webpack/Vue","user":{"login":"leo108","id":1551716,"avatar_url":"https://avatars.githubusercontent.com/u/1551716?v=3","gravatar_id":"","url":"https://api.github.com/users/leo108","html_url":"https://github.com/leo108","followers_url":"https://api.github.com/users/leo108/followers","following_url":"https://api.github.com/users/leo108/following{/other_user}","gists_url":"https://api.github.com/users/leo108/gists{/gist_id}","starred_url":"https://api.github.com/users/leo108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leo108/subscriptions","organizations_url":"https://api.github.com/users/leo108/orgs","repos_url":"https://api.github.com/users/leo108/repos","events_url":"https://api.github.com/users/leo108/events{/privacy}","received_events_url":"https://api.github.com/users/leo108/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-26T08:39:41Z","updated_at":"2016-08-27T05:03:55Z","closed_at":null,"body":"I'm using laravel 5.3, there is a webpack task to pack `.Vue` files in my gulpfile, everything is OK if I run `gulp` or `gulp watch`, but if I run `gulp --production`, it says\r\n\r\n> Hmm, not sure how to compress this type of file. Stick with CSS or JavaScript files!\r\n\r\nI traced this string, and found it in `node_modules/laravel-elixir/dist/tasks/utilities/minifier.js`\r\n\r\n```\r\nexports.default = function (output) {\r\n    switch (output.extension) {\r\n        case '.css':\r\n            return minifyCss();\r\n        case '.js':\r\n            return minifyJs();\r\n    }\r\n\r\n    Elixir.fail('Hmm, not sure how to compress this type of file. ' + 'Stick with CSS or JavaScript files!');\r\n};\r\n```\r\n\r\nI tried to log the `output` param, and the result is\r\n\r\n```\r\n{ \r\n  path: 'public/js',\r\n  name: '',\r\n  extension: '',\r\n  isDir: true,\r\n  baseDir: 'public/js' \r\n}\r\n```\r\n\r\nis that a bug? or my error usage ?"},"comment":{"url":"https://api.github.com/repos/laravel/elixir/issues/comments/242896446","html_url":"https://github.com/laravel/elixir/issues/620#issuecomment-242896446","issue_url":"https://api.github.com/repos/laravel/elixir/issues/620","id":242896446,"user":{"login":"leo108","id":1551716,"avatar_url":"https://avatars.githubusercontent.com/u/1551716?v=3","gravatar_id":"","url":"https://api.github.com/users/leo108","html_url":"https://github.com/leo108","followers_url":"https://api.github.com/users/leo108/followers","following_url":"https://api.github.com/users/leo108/following{/other_user}","gists_url":"https://api.github.com/users/leo108/gists{/gist_id}","starred_url":"https://api.github.com/users/leo108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leo108/subscriptions","organizations_url":"https://api.github.com/users/leo108/orgs","repos_url":"https://api.github.com/users/leo108/repos","events_url":"https://api.github.com/users/leo108/events{/privacy}","received_events_url":"https://api.github.com/users/leo108/received_events","type":"User","site_admin":false},"created_at":"2016-08-27T05:03:55Z","updated_at":"2016-08-27T05:03:55Z","body":"```\r\nconst elixir = require('laravel-elixir');\r\nconst glob = require('glob');\r\nconst path = require('path');\r\nconst del = require(\"del\");\r\n\r\nrequire('laravel-elixir-vue');\r\n\r\nvar getEntries = function (globPath, replace) {\r\n    var entries = {};\r\n    glob.sync(globPath).forEach(function (entry) {\r\n        var basename = entry.replace(replace, '').replace(/\\.js$/, '');\r\n        entries[basename] = entry;\r\n    });\r\n    return entries;\r\n};\r\n\r\nvar config = Elixir.config;\r\nvar assetsPath = './' + config.assetsPath;\r\nvar publicPath = './' + config.publicPath;\r\nvar browserSyncHost = process.env.BROWSER_SYNC_HOST ? process.env.BROWSER_SYNC_HOST : 'localhost';\r\nvar browserSyncPort = process.env.BROWSER_SYNC_POST ? process.env.BROWSER_SYNC_POST : 3000;\r\n\r\nelixir(mix => {\r\n    var entries = getEntries(assetsPath + \"/js/app/**/*.js\", assetsPath + \"/js/\");\r\n    entries['bootstrap'] = assetsPath + '/js/bootstrap.js';\r\n    mix.sass('app.scss')\r\n        .webpack('', '', '', {\r\n            entry: entries,\r\n            output: {\r\n                path: path.join(__dirname, publicPath, '/js/'),\r\n                filename: \"[name].js\"\r\n            }\r\n        })\r\n        .version(['**/*.js', '**/*.css'])\r\n        .browserSync({\r\n            files: [\r\n                config.get('public.css.outputFolder') + '/**/*.css',\r\n                config.get('public.js.outputFolder') + '/**/*.js',\r\n                config.get('public.versioning.buildFolder') + '/rev-manifest.json',\r\n                config.viewPath + '/**/*.php'\r\n            ],\r\n            proxy: false,\r\n            port: browserSyncPort,\r\n            socket: {\r\n                domain: browserSyncHost + ':' + browserSyncPort\r\n            },\r\n            open: false,\r\n            ghost: false,\r\n            notify: false\r\n        })\r\n    ;\r\n});\r\n```\r\n\r\n@JeffreyWay \r\n\r\nthere are `.vue` files in `assets/js/components/`directory"}}
{"actor":{"display_login":"leo108"}}