{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue-cli/issues/661","repository_url":"https://api.github.com/repos/vuejs/vue-cli","labels_url":"https://api.github.com/repos/vuejs/vue-cli/issues/661/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue-cli/issues/661/comments","events_url":"https://api.github.com/repos/vuejs/vue-cli/issues/661/events","html_url":"https://github.com/vuejs/vue-cli/issues/661","id":278087903,"node_id":"MDU6SXNzdWUyNzgwODc5MDM=","number":661,"title":"webpackjsonp is not defined?","user":{"login":"JIANGYUJING1995","id":24609149,"node_id":"MDQ6VXNlcjI0NjA5MTQ5","avatar_url":"https://avatars2.githubusercontent.com/u/24609149?v=4","gravatar_id":"","url":"https://api.github.com/users/JIANGYUJING1995","html_url":"https://github.com/JIANGYUJING1995","followers_url":"https://api.github.com/users/JIANGYUJING1995/followers","following_url":"https://api.github.com/users/JIANGYUJING1995/following{/other_user}","gists_url":"https://api.github.com/users/JIANGYUJING1995/gists{/gist_id}","starred_url":"https://api.github.com/users/JIANGYUJING1995/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JIANGYUJING1995/subscriptions","organizations_url":"https://api.github.com/users/JIANGYUJING1995/orgs","repos_url":"https://api.github.com/users/JIANGYUJING1995/repos","events_url":"https://api.github.com/users/JIANGYUJING1995/events{/privacy}","received_events_url":"https://api.github.com/users/JIANGYUJING1995/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-11-30T11:31:38Z","updated_at":"2018-07-03T21:10:25Z","closed_at":"2017-11-30T12:43:50Z","author_association":"NONE","body":"var path = require('path')\r\nvar utils = require('./utils')\r\nvar webpack = require('webpack')\r\nvar config = require('../config')\r\nvar merge = require('webpack-merge')\r\nvar baseWebpackConfig = require('./webpack.base.conf')\r\nvar CopyWebpackPlugin = require('copy-webpack-plugin')\r\nvar HtmlWebpackPlugin = require('html-webpack-plugin')\r\nvar ExtractTextPlugin = require('extract-text-webpack-plugin')\r\nvar OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin');\r\nvar babelpolyfill = require(\"babel-polyfill\");\r\n\r\nvar env = config.build.env\r\n\r\nvar webpackConfig = merge(baseWebpackConfig, {\r\n  module: {\r\n    rules: utils.styleLoaders({\r\n      sourceMap: config.build.productionSourceMap,\r\n      extract: true\r\n    })\r\n  },\r\n  devtool: config.build.productionSourceMap ? '#source-map' : false,\r\n  output: {\r\n    path: config.build.assetsRoot,\r\n    filename: utils.assetsPath('js/[name].js'),\r\n    chunkFilename: utils.assetsPath('js/[id].js')\r\n  },\r\n  plugins: [\r\n    // http://vuejs.github.io/vue-loader/en/workflow/production.html\r\n    new webpack.DefinePlugin({\r\n      'process.env': env\r\n    }),\r\n    new webpack.optimize.UglifyJsPlugin({\r\n      compress: {\r\n        warnings: false\r\n      },\r\n      sourceMap: true\r\n    }),\r\n    // extract css into its own file\r\n    new ExtractTextPlugin({\r\n      filename: utils.assetsPath('css/[name].[contenthash].css')\r\n    }),\r\n    // Compress extracted CSS. We are using this plugin so that possible\r\n    // duplicated CSS from different components can be deduped.\r\n    new OptimizeCSSPlugin({\r\n      cssProcessorOptions: {\r\n        safe: true\r\n      }\r\n    }),\r\n    // generate dist index.html with correct asset hash for caching.\r\n    // you can customize output by editing /index.html\r\n    // see https://github.com/ampedandwired/html-webpack-plugin\r\n    new HtmlWebpackPlugin({\r\n      filename: config.build.index,\r\n      template: 'index.html',\r\n      inject: true,\r\n      minify: {\r\n        removeComments: true,\r\n        collapseWhitespace: true,\r\n        removeAttributeQuotes: true\r\n        // more options:\r\n        // https://github.com/kangax/html-minifier#options-quick-reference\r\n      },\r\n      chunks: ['manifest', 'vendor', 'app'],\r\n      // necessary to consistently work with multiple chunks via CommonsChunkPlugin\r\n      chunksSortMode: 'dependency'\r\n    }),\r\n    // split vendor js into its own file\r\n    new webpack.optimize.CommonsChunkPlugin({\r\n      name: 'vendor',\r\n      minChunks: function (module, count) {\r\n        // any required modules inside node_modules are extracted to vendor\r\n        return (\r\n          module.resource &&\r\n          /\\.js$/.test(module.resource) &&\r\n          module.resource.indexOf(\r\n            path.join(__dirname, '../node_modules')\r\n          ) === 0\r\n        )\r\n      }\r\n    }),\r\n    \r\n    // extract webpack runtime and module manifest to its own file in order to\r\n    // prevent vendor hash from being updated whenever app bundle is updated\r\n    new webpack.optimize.CommonsChunkPlugin({\r\n      name: 'manifest',\r\n      chunks: ['vendor']\r\n    }),\r\n    // copy custom static assets\r\n    new CopyWebpackPlugin([\r\n      {\r\n        from: path.resolve(__dirname, '../static'),\r\n        to: config.build.assetsSubDirectory,\r\n        ignore: ['.*']\r\n      }\r\n    ])\r\n  ]\r\n})\r\n\r\nif (config.build.productionGzip) {\r\n  var CompressionWebpackPlugin = require('compression-webpack-plugin')\r\n\r\n  webpackConfig.plugins.push(\r\n    new CompressionWebpackPlugin({\r\n      asset: '[path].gz[query]',\r\n      algorithm: 'gzip',\r\n      test: new RegExp(\r\n        '\\\\.(' +\r\n        config.build.productionGzipExtensions.join('|') +\r\n        ')$'\r\n      ),\r\n      threshold: 10240,\r\n      minRatio: 0.8\r\n    })\r\n  )\r\n}\r\n\r\nif (config.build.bundleAnalyzerReport) {\r\n  var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin\r\n  webpackConfig.plugins.push(new BundleAnalyzerPlugin())\r\n}\r\n\r\nmodule.exports = webpackConfig\r\n"},"comment":{"url":"https://api.github.com/repos/vuejs/vue-cli/issues/comments/402292838","html_url":"https://github.com/vuejs/vue-cli/issues/661#issuecomment-402292838","issue_url":"https://api.github.com/repos/vuejs/vue-cli/issues/661","id":402292838,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjI5MjgzOA==","user":{"login":"rayfoss","id":876076,"node_id":"MDQ6VXNlcjg3NjA3Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/876076?v=4","gravatar_id":"","url":"https://api.github.com/users/rayfoss","html_url":"https://github.com/rayfoss","followers_url":"https://api.github.com/users/rayfoss/followers","following_url":"https://api.github.com/users/rayfoss/following{/other_user}","gists_url":"https://api.github.com/users/rayfoss/gists{/gist_id}","starred_url":"https://api.github.com/users/rayfoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rayfoss/subscriptions","organizations_url":"https://api.github.com/users/rayfoss/orgs","repos_url":"https://api.github.com/users/rayfoss/repos","events_url":"https://api.github.com/users/rayfoss/events{/privacy}","received_events_url":"https://api.github.com/users/rayfoss/received_events","type":"User","site_admin":false},"created_at":"2018-07-03T21:10:25Z","updated_at":"2018-07-03T21:10:25Z","author_association":"NONE","body":"I'm having this issue after switching to vue-cli v3 and running a build, I'm coming from the webpack template. `npm run serve` works fine.  @ergonomicus @JIANGYUJING1995 any clue as to what the error is about?"}}
{"actor":{"display_login":"rayfoss"}}