{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/webpack/issues/5548","repository_url":"https://api.github.com/repos/webpack/webpack","labels_url":"https://api.github.com/repos/webpack/webpack/issues/5548/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack/issues/5548/comments","events_url":"https://api.github.com/repos/webpack/webpack/issues/5548/events","html_url":"https://github.com/webpack/webpack/issues/5548","id":251504358,"number":5548,"title":"Spread Operator bug?","user":{"login":"damianobarbati","id":2225869,"avatar_url":"https://avatars2.githubusercontent.com/u/2225869?v=4","gravatar_id":"","url":"https://api.github.com/users/damianobarbati","html_url":"https://github.com/damianobarbati","followers_url":"https://api.github.com/users/damianobarbati/followers","following_url":"https://api.github.com/users/damianobarbati/following{/other_user}","gists_url":"https://api.github.com/users/damianobarbati/gists{/gist_id}","starred_url":"https://api.github.com/users/damianobarbati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damianobarbati/subscriptions","organizations_url":"https://api.github.com/users/damianobarbati/orgs","repos_url":"https://api.github.com/users/damianobarbati/repos","events_url":"https://api.github.com/users/damianobarbati/events{/privacy}","received_events_url":"https://api.github.com/users/damianobarbati/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":30,"created_at":"2017-08-20T18:02:54Z","updated_at":"2018-04-25T14:29:06Z","closed_at":"2017-08-21T11:17:03Z","author_association":"NONE","body":"Bug.\r\nI'm requiring a file with the following statement (using `require` because I'll be using both on node and browser):\r\n```\r\nconst user = require('skeemas/complexUser');\r\n```\r\n\r\nThe working `complexUser`:\r\n```\r\nconst user = require('./user');\r\nconst individual = require('./individual');\r\nconst company = require('./company');\r\nconst credential = require('./credential');\r\n\r\nconst complexUser = {\r\n    type: {\r\n        type: 'text',\r\n        values: ['individual', 'company'],\r\n        predefined: 'individual',\r\n    }\r\n}\r\n\r\nObject.assign(complexUser, user, individual, company, credential);\r\n\r\nmodule.exports = complexUser;\r\n```\r\n\r\nThe NOT working `complexUser`:\r\n```\r\nconst user = require('./user');\r\nconst individual = require('./individual');\r\nconst company = require('./company');\r\nconst credential = require('./credential');\r\n\r\nmodule.exports = {\r\n    type: {\r\n        type: 'text',\r\n        values: ['individual', 'company'],\r\n        predefined: 'individual',\r\n    },\r\n    ...user,\r\n    ...individual,\r\n    ...company,\r\n    ...credential,\r\n};\r\n```\r\n\r\nError thrown by Webpack:\r\n```\r\n ERROR in ./node_modules/skeemas/complexUser.js\r\n    Module parse failed: /Users/damz/Desktop/repmemo/node_modules/skeemas/complexUser.js Unexpected token (12:4)\r\n    You may need an appropriate loader to handle this file type.\r\n    |         predefined: 'individual',\r\n    |     },\r\n    |     ...user,\r\n    |     ...individual,\r\n    |     ...company,\r\n     @ ./models/user.js 1:13-43\r\n     @ ./models/userPresenter.js\r\n     @ ./apps/user/components/profileForm.js\r\n     @ ./apps/user/router.js\r\n     @ ./apps/user/index.js\r\n```\r\n\r\nBoth babel and node do not complain if running the file directly (https://goo.gl/E3ZSEq)."},"comment":{"url":"https://api.github.com/repos/webpack/webpack/issues/comments/384307265","html_url":"https://github.com/webpack/webpack/issues/5548#issuecomment-384307265","issue_url":"https://api.github.com/repos/webpack/webpack/issues/5548","id":384307265,"user":{"login":"chearon","id":78187,"avatar_url":"https://avatars3.githubusercontent.com/u/78187?v=4","gravatar_id":"","url":"https://api.github.com/users/chearon","html_url":"https://github.com/chearon","followers_url":"https://api.github.com/users/chearon/followers","following_url":"https://api.github.com/users/chearon/following{/other_user}","gists_url":"https://api.github.com/users/chearon/gists{/gist_id}","starred_url":"https://api.github.com/users/chearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chearon/subscriptions","organizations_url":"https://api.github.com/users/chearon/orgs","repos_url":"https://api.github.com/users/chearon/repos","events_url":"https://api.github.com/users/chearon/events{/privacy}","received_events_url":"https://api.github.com/users/chearon/received_events","type":"User","site_admin":false},"created_at":"2018-04-25T14:29:06Z","updated_at":"2018-04-25T14:29:06Z","author_association":"NONE","body":"It shows webpack is using acorn 5.5 (what I'm doing is building [handsontable](https://github.com/handsontable/handsontable/) with babel loader removed, compile with `webpack src`)\r\n\r\n```\r\n[I] ~/C/handsontable> yarn why acorn\r\nyarn why v1.5.1\r\n[1/4] 🤔  Why do we have the module \"acorn\"...?\r\n[2/4] 🚚  Initialising dependency graph...\r\n[3/4] 🔍  Finding dependency...\r\n[4/4] 🚡  Calculating file sizes...\r\n=> Found \"acorn@4.0.13\"\r\ninfo Has been hoisted to \"acorn\"\r\ninfo Reasons this module exists\r\n   - Hoisted from \"webpack#acorn-dynamic-import#acorn\"\r\n   - Hoisted from \"jest#jest-cli#jest-environment-jsdom#jsdom#acorn\"\r\n   - Hoisted from \"jest#jest-cli#jest-environment-jsdom#jsdom#acorn-globals#acorn\"\r\ninfo Disk size without dependencies: \"172MB\"\r\ninfo Disk size with unique dependencies: \"172MB\"\r\ninfo Disk size with transitive dependencies: \"172MB\"\r\ninfo Number of shared dependencies: 0\r\n=> Found \"webpack#acorn@5.5.3\"\r\ninfo This module exists because \"webpack\" depends on it.\r\ninfo Disk size without dependencies: \"72MB\"\r\ninfo Disk size with unique dependencies: \"72MB\"\r\ninfo Disk size with transitive dependencies: \"72MB\"\r\ninfo Number of shared dependencies: 0\r\n\r\n... 3 more omitted\r\n```"}}
{"actor":{"display_login":"chearon"}}