{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue-cli/issues/2202","repository_url":"https://api.github.com/repos/vuejs/vue-cli","labels_url":"https://api.github.com/repos/vuejs/vue-cli/issues/2202/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue-cli/issues/2202/comments","events_url":"https://api.github.com/repos/vuejs/vue-cli/issues/2202/events","html_url":"https://github.com/vuejs/vue-cli/issues/2202","id":350312433,"node_id":"MDU6SXNzdWUzNTAzMTI0MzM=","number":2202,"title":"webpack-chain seems to conflict with some other limitations","user":{"login":"AlphaCodeZero","id":15966914,"node_id":"MDQ6VXNlcjE1OTY2OTE0","avatar_url":"https://avatars0.githubusercontent.com/u/15966914?v=4","gravatar_id":"","url":"https://api.github.com/users/AlphaCodeZero","html_url":"https://github.com/AlphaCodeZero","followers_url":"https://api.github.com/users/AlphaCodeZero/followers","following_url":"https://api.github.com/users/AlphaCodeZero/following{/other_user}","gists_url":"https://api.github.com/users/AlphaCodeZero/gists{/gist_id}","starred_url":"https://api.github.com/users/AlphaCodeZero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlphaCodeZero/subscriptions","organizations_url":"https://api.github.com/users/AlphaCodeZero/orgs","repos_url":"https://api.github.com/users/AlphaCodeZero/repos","events_url":"https://api.github.com/users/AlphaCodeZero/events{/privacy}","received_events_url":"https://api.github.com/users/AlphaCodeZero/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-14T07:33:39Z","updated_at":"2018-08-14T07:41:10Z","closed_at":"2018-08-14T07:41:10Z","author_association":"NONE","body":"### Version\r\n3.0.0\r\n\r\n### Node and OS info\r\nNode 10.7.0 / npm 6.2.0 / macOS High Sierra\r\n\r\n### Steps to reproduce\r\nIn vue.config.js, just write something like:\r\n```javascript\r\nconst path = require('path')\r\n\r\nmodule.exports = {\r\n  // https://github.com/mozilla-neutrino/webpack-chain\r\n  chainWebpack: (config) => {\r\n    config.output.path(path.resolve('../backend/app/public'))\r\n    config.output.publicPath('/public/')\r\n    config.plugin('define').tap(() => [{\r\n      'process.env': {\r\n        NODE_ENV: '\"production\"',\r\n        BASE_URL: 'window.location.origin + \"/api/\"',\r\n      },\r\n    }])\r\n  },\r\n}\r\n```\r\nThen run `vue inspect`, all is well. But after `npm run build`, the terminal said 'Configuration Error: Avoid modifying webpack output.path directly. Use the \"outputDir\" option instead.'\r\n\r\n### What is expected?\r\nThe `output.path` and `output.publicPath` should be resolved correctly.\r\n\r\n### What is actually happening?\r\nThe vue-cli rejected to build.\r\n\r\n\r\n---\r\nI saw the warning in the documentation:\r\n> For example, instead of modifying output.path, you should use the outputDir option in vue.config.js; instead of modifying output.publicPath, you should use the baseUrl option in vue.config.js.\r\n\r\nBut I think it isn't suitable for [webpack-chain](https://github.com/mozilla-neutrino/webpack-chain), since there aren't any methods called outputDir or baseUrl in webpack-chain.\r\n\r\n<!-- generated by vue-issues. DO NOT REMOVE -->"},"comment":{"url":"https://api.github.com/repos/vuejs/vue-cli/issues/comments/412783246","html_url":"https://github.com/vuejs/vue-cli/issues/2202#issuecomment-412783246","issue_url":"https://api.github.com/repos/vuejs/vue-cli/issues/2202","id":412783246,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjc4MzI0Ng==","user":{"login":"sodatea","id":3277634,"node_id":"MDQ6VXNlcjMyNzc2MzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/3277634?v=4","gravatar_id":"","url":"https://api.github.com/users/sodatea","html_url":"https://github.com/sodatea","followers_url":"https://api.github.com/users/sodatea/followers","following_url":"https://api.github.com/users/sodatea/following{/other_user}","gists_url":"https://api.github.com/users/sodatea/gists{/gist_id}","starred_url":"https://api.github.com/users/sodatea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sodatea/subscriptions","organizations_url":"https://api.github.com/users/sodatea/orgs","repos_url":"https://api.github.com/users/sodatea/repos","events_url":"https://api.github.com/users/sodatea/events{/privacy}","received_events_url":"https://api.github.com/users/sodatea/received_events","type":"User","site_admin":false},"created_at":"2018-08-14T07:41:10Z","updated_at":"2018-08-14T07:41:10Z","author_association":"MEMBER","body":"`outputDir` & `baseUrl` are root level options.\r\n```\r\nmodule.exports = {\r\n  outputDir: 'xxx',\r\n  baseUrl: 'xxx',\r\n  chainWebpack: () => {}\r\n}\r\n```"}}
{"actor":{"display_login":"sodatea"}}