f-loat / ithome-lite Goto Github PK
View Code? Open in Web Editor NEW🥛 IT之家第三方小程序版客户端(使用 mpvue 开发,兼容 web)
License: MIT License
🥛 IT之家第三方小程序版客户端(使用 mpvue 开发,兼容 web)
License: MIT License
增加路由后,再npm run build 或者 dev ,会一直死在building for production...这条命令行中,不动。
如何配置才能编译出h5代码?还是已经写好了配置,那应该如何执行呢?
error in ./node_modules/_mpvue-entry@0.4.1@mpvue-entry/dist/QuanziDetail.js
Module parse failed: Unexpected token (11:2)
You may need an appropriate loader to handle this file type.
新闻相关的接口有几个参数不太清楚是哪儿来的,有能力的人可以帮忙测下😋
因为使用了mpvue-router-patch
包,但是并没有经过babel
处理,导致打包后的vendor.js
包含const
,经测试,在ios
10版本及以下会出现如图错误。
{
test: /\.js$/,
loader: 'babel-loader?cacheDirectory=true',
include: [
/node_modules\/.*mpvue-router-patch.*/,
// /node_modules\/.*query-string.*/,
],
},
}
我的解决办法是使用babel-loader
处理,但是mpvue-router-patch
引用的query-string
这个包也是使用了const
,没有经过babel
处理。我将query-string
也同样处理后,但是query-string
并不是使用es6
写法,不知道怎么处理了。
import queryString from 'query-string';
const queryStr = queryString.stringify(query, { encode: false })
改为
import queryString from 'querystring';
const queryStr = queryString.stringify(query)
我将query-string
替换为querystring
解决了兼容问题。请问怎样配置能解决这个问题的。
打包完,项目不能启动,文件找不到
我们公司现在让我们用mpvue同时开发h5和小程序 不知道是否可行 目前一直在踩坑 请大神指点一二 跪谢
调试模式正常,打包后显示错误
阁下在这个项目中使用v-router作为路由管理,编译成web端的实现是可行的,但是编译为小程序版本的代码后有想过什么解决方案吗,毕竟小程序不支持window对象蛤。还有就是mpvue-router-patch作为小程序版的v-router可以作为生产工具吗?还是说我们需要再v-router的基础上重新封装一个mpvue版本的router?
ERROR in ./node_modules/_mpvue-entry@0.4.1@mpvue-entry/dist/QuanziDetail.js
Module parse failed: Unexpected token (11:2)
You may need an appropriate loader to handle this file type.
| const app = new Vue({
| store,
| ...App
| })
| app.$mount()
Build failed with errors.
uni-app支持引入小程序原生组件,这里的例子支持uni-app官方形式创建wxcomponents文件夹引入小程序原生组件么?
emmm,小白想问一下template 里面是什么写法,用了vue-router有啥好处吗
微信开发工具上,背景有显示。手机上浏览时,背景图片不显示。
请问能不能具体一些,比如像具体操作步骤,万分感谢了!mpvue没有提供,F-loat也没有细说,找不到相关博客说明……
请问这个可以在pc跑吗? vuejs版的 谢谢
ERROR Failed to compile with 5 errors #6 @F-loat 10:17:56
error in ./node_modules/_mpvue-entry@0.3.7@mpvue-entry/dist/NewsList.js
Module parse failed: Unexpected token (11:2)
You may need an appropriate loader to handle this file type.
| const app = new Vue({
| store,
| ...App
| })
| app.$mount()
(node:3652) UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property compile
of 'undefined' or 'null'.
at addHooks (/Users/yuchen/Documents/demo/ithome-lite/node_modules/webpack-dev-server/lib/Server.js:131:49)
at new Server (/Users/yuchen/Documents/demo/ithome-lite/node_modules/webpack-dev-server/lib/Server.js:144:5)
at module.exports.require.then.webpackConfig (/Users/yuchen/Documents/demo/ithome-lite/node_modules/mpvue-packager-h5-plugin/dev.js:18:18)
at
at process._tickCallback (internal/process/next_tick.js:160:7)
at Function.Module.runMain (module.js:703:11)
at startup (bootstrap_node.js:190:16)
at bootstrap_node.js:662:3
(node:3652) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3652) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
.postcssrc.js
判断当前运行模式,
process.env.MODE === 'h5'
process.env.MODE 这个参数,在哪里设置,demo中找不到
导致,一直执行 rem 转 rpx
Module parse failed: C:\Users\xxbmm\Desktop\ithome-lite\node_modules_mpvue-entr y@0.3.2@mpvue-entry\QuanziList.js Unexpected token (11:2)
You may need an appropriate loader to handle this file type.
| const app = new Vue({
| store,
| ...App
| })
| app.$mount()
PrintOrder: (data) => request.post(base + '/business/order/print_order', data)
请问post请求失败这个要怎么处理呀?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.