server started at localhost:8080
[ './~/element-ui/lib/theme-default/alert.css\nModule parse failed: /Users/username/test/vue/vue-ssr-demo/node_modules/element-ui/lib/theme-default/alert.css Unexpected character \'@\' (1:0)\nYou may need an appropriate loader to handle this file type.\n| @charset "UTF-8";.el-alert{width:100%;padding:8px 16px;margin:0;box-sizing:border-box;border-radius:4px;position:relative;background-color:#fff;overflow:hidden;color:#fff;opacity:1;display:table;transition:opacity .2s}.el-alert .el-alert__description{color:#fff;font-size:12px;margin:5px 0 0}.el-alert--success{background-color:#13ce66}.el-alert--info{background-color:#50bfff}.el-alert--warning{background-color:#f7ba2a}.el-alert--error{background-color:#ff4949}.el-alert__content{display:table-cell;padding:0 8px}.el-alert__icon{font-size:16px;width:16px;display:table-cell;color:#fff;vertical-align:middle}.el-alert__icon.is-big{font-size:28px;width:28px}.el-alert__title{font-size:13px;line-height:18px}.el-alert__title.is-bold{font-weight:700}.el-alert__closebtn{font-size:12px;color:#fff;opacity:1;top:12px;right:15px;position:absolute;cursor:pointer}.el-alert__closebtn.is-customed{font-style:normal;font-size:13px;top:9px}.el-alert-fade-enter,.el-alert-fade-leave-active{opacity:0}\n @ ./src/event-bus/bus.js 4:0-48\n @ ./src/event-bus/index.js\n @ ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue\n @ ./src/App.vue\n @ ./src/app.js\n @ ./src/entry-server.js' ]
webpack built 2ac3765c9e313c9b5365 in 5064ms
例如在js代码中引入css
则使用
node server
运行时报错入下:但是执行
build
命令是没有问题的,只有执行node server
会报错~