problem description
ERROR in static/js/vendor.aeb6bfbb1be1379842a3.js from UglifyJs
Unexpected token name I , expected punc ; [static/js/vendor.aeb6bfbb1be1379842a3.js:45714,11]
the environmental background of the problems and what methods you have tried
the guess should be caused by using es6,map, arrow function and other methods. I found out the corresponding solutions to related problems but did not use them.
related codes
/ / Please paste the code text below (do not replace the code with pictures)
var path = require ("path")
var config = require (". / config")
var utils = require (". / utils")
var autoprefixer = require ("autoprefixer");
var projectRoot = path.resolve (_ dirname,".. /")
module.exports = {
entry: {
app: ["babel-polyfill", "./src/main.js"]
},
output: {
path: config.build.assetsRoot,
publicPath: process.env.NODE_ENV === "production" ? config.build.assetsPublicPath : config.dev.assetsPublicPath,
filename: "[name].js"
},
resolve: {
extensions: [".js", ".vue"],
// fallback: [path.join(__dirname, "../node_modules")],
alias: {
"vue": "vue/dist/vue.common.js",
"src": path.resolve(__dirname, "../src"),
"assets": path.resolve(__dirname, "../src/assets"),
"components": path.resolve(__dirname, "../src/components")
}
},
/ / introduce plug-ins
/ / externals: {
/ / jquery: "window.$"
/ /},
/ / resolveLoader: {
/ / fallback: [path.join (_ dirname,". / node_modules")]
/ /},
module: {
// loaders: [
rules:[
{
test: /\.vue$/,
//loader: "vue"
use: [
{
loader: "vue-loader",
options: {
postcss: [
require("postcss-cssnext")()
]
// ,
// cssModules: {
// // localIdentName: "[path][name]---[local]---[hash:base64:5]",
// // camelCase: true
// }
}
}
]
},
{
test: /\.js$/,
// loader: "babel",
use:["babel-loader"],
include: projectRoot,
exclude: /node_modules/
},
what result do you expect? What is the error message actually seen?
I don"t know how to change the packing piece.