Open saxon-yc opened 5 years ago
同问
王者归来~~
今天看见大佬提供的方案试了下 但是很可惜 不行 希望大佬能解答
即使这样 还是不行
@Evans-Cai 看报错你似乎没有安装依赖 @vux/loader
安装了 vux-loader:1.2.9 这也是我比较困惑的
@airyland 我已经找到问题了,在cli里面我们需要安装 "@vux/loader": "2.0.0-rc2", 这个最新版本的vux-loader, 之前安装的vux-loader :1.2.9 在cli3里面不适用,但是我找不到 "@vux/loader": "2.0.0-rc2", 谢谢大佬的源码示例
@Evans-Cai 应该是发布时的 tag 问题,你可以安装 rc3 试试。
按照示例 https://github.com/airyland/vux/blob/v2/packages/vue-cli-3-example/vue.config.js 配置,如有问题麻烦反馈。
会警告这个东西You should write display: flex by final spec instead of display: box
安装了最新的"@vux/loader": "^2.0.0-rc3", 配置了 configureWebpack: config => { require('@vux/loader').merge(config, { plugins: ['vux-ui', { name: 'less-theme', path: './node_modules/vux/src/theme.less' }] }) }, 运行项目,图片损坏,无法显示图片
我也遇到同样的问题 安装了最新的"@vux/loader": "^2.0.0-rc3"之后 组件正常加载,但是图片无法显示
应该这样引入:
require('vux-loader').merge(config, {
options: {},
plugins: [
{name: 'vux-ui'}
]
})
按照示例 https://github.com/airyland/vux/blob/v2/packages/vue-cli-3-example/vue.config.js 配置,如有问题麻烦反馈。
会警告这个东西You should write display: flex by final spec instead of display: box
同遇到这个问题
@masterymastery 升级到 2.0.0-rc4
check 你的demo下来安装可以正常运行,但稍作修改在有些移动端浏览器报错
报错浏览器: ua Mozilla/5.0 (Linux; U; Android 8.1.0; zh-cn; PACM00 Build/O11019) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.134 Mobile Safari/537.36 OppoBrowser/10.5.0.
报错内容:unexpected token at Object node_modules/vux/src/components/v-chart/mixins.js
报错浏览器:ua:iphone ios9.2.1
报错内容:syntaxError unexpected tokin '>' /app.js:2693:5
代码部分我只做了如下的修改,即将原来以src引入的脚本内联到script中
<template>
<div class="hello">
<img src="../assets/logo.png" alt=""/>
<group>
<cell title="hello world" @click.native="alert"></cell>
</group>
</div>
</template>
<script >
import Group from 'vux/src/components/group/index'
import { Cell } from 'vux'
export default {
components: {
Group,
Cell
},
props: {
msg: String
},
methods: {
alert () {
this.$vux.alert.show('hello')
}
}
}
</script>
<style scoped lang="less">
.hello {
text-align: center;
}
</style>
按照示例添加相关配置,并安装最新版vux、@vux/loader,组件样式不正确,提示需升级vux-loader:
-- vue代码
<template>
<group>
<cell title="cell title" is-link/>
</group>
</template>
-- vue.config.js
module.exports = {
configureWebpack: config => {
require('@vux/loader').merge(config, {
plugins: [
'vux-ui'
]
})
}
}
-- 依赖
"dependencies": {
"@vux/loader": "^2.0.0-rc4",
"core-js": "^2.6.5",
"vue": "^2.6.10",
"vux": "^2.9.4"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.6.0",
"@vue/cli-plugin-eslint": "^3.6.0",
"@vue/cli-service": "^3.6.0",
"babel-eslint": "^10.0.1",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"less-loader": "^4.1.0",
"vue-template-compiler": "^2.5.21"
}
使用 https://github.com/airyland/vux/blob/v2/packages/vue-cli-3-example/ demo 打包后,在 ios 9.3 版本不兼容,语法不兼容,没有经过 babel 处理吧
@ltinyho 打包后没有在 chunk-vendors 里搜索到 const。
@louie-001 需要给出完整代码,最好建个 repo。
@snowlotus 麻烦建个 repo 来重现。
我也遇到同样的问题 安装了最新的"@vux/loader": "^2.0.0-rc3"之后 组件正常加载,但是图片无法显示
请问执行什么指令来安装这个:"@vux/loader": "^2.0.0-rc3"
@maomaoliangliang 直接 npm install @vux/loader 或者 yarn add @vux/loader
@ltinyho 打包后没有在 chunk-vendors 里搜索到 const。
这个是我建的repo, https://github.com/ltinyho/vux-vue-cli-3-example ,打包后在 chunk-vendors 里出现了 const
,希望能够得到答复.
@louie-001 需要给出完整代码,最好建个 repo。
@airyland 样式问题是引入了其他样式文件引起的,提示升级vux-loader不知道是什么原因,这是demo的repo:https://github.com/louie-001/vux-cli3-demo
很多地方都报这个错误
npm install babel-plugin-import --save-dev 然后在 babel.config.js 下增加plugin: module.exports = { presets: [ '@vue/app', ], plugins: [ ['import', { libraryName: 'vux', libraryDirectory: 'src/components' }], ], };
npm install babel-plugin-import --save-dev 然后在 babel.config.js 下增加plugin: module.exports = { presets: [ '@vue/app', ], plugins: [ ['import', { libraryName: 'vux', libraryDirectory: 'src/components' }], ], };
这样 plugin插件就没法用了
@louie-001 和你一样的情况
谁能帮我解答一下啊,我下载了vux 的源码,但是 项目跑不起来 说我 Cannot find module './src/routes.json',无法自动生成 routes.json 文件,谁能帮我解答一下,问题出在那里
@airyland 什么时候可以支持nuxt2?
解决编码后代码中还存在es6的问题 【https://cli.vuejs.org/zh/config/#transpiledependencies 默认情况下 babel-loader 会忽略所有 node_modules 中的文件】 vue.config.js中加入 transpileDependencies: ['vux']
` "@vux/loader": "^2.0.0-rc4",
webpack.base.config.js module.exports = require('@vux/loader').merge(webpackConfig, { plugins: [ {name:'vux-ui'}, {name: 'less-theme', path: 'src/assets/css/theme.less'} ] }) ` 报错 这个是咋回事呢?
@louie-001 我也是一样的情况
@zhixueyun9 如果是显示没有按需加载组件,试下这样写
// main.js
// import { LoadingPlugin } from "vux";
// notice: 不要使用解构语法,否则打包会全部打包进去(BUG?)
import ToastPlugin from "vux/src/plugins/toast";
Vue.use(ToastPlugin, { position: "bottom", type: "text", width: "14.6em" });
@JustGogoing webpackConfig.module.rules中的use都写成数组
按照示例 https://github.com/airyland/vux/blob/v2/packages/vue-cli-3-example/vue.config.js 配置,如有问题麻烦反馈。
按照示例配置的且安装了对应的依赖,还是在build打包进去了v-chart等没有引用的代码,导致在低版本的浏览器如chrome55或者移动端低版本浏览器上报错,不知道如何解决,还请有时间看一下这个问题,使用的是vuecli3
很多地方都报这个错误
老哥解决了吗
很多地方都报这个错误
我也报这个错,请问解决了吗?
未解决
13631452939 | |
---|---|
邮箱:13631452939@163.com |
Signature is customized by Netease Mail Master
在2019年06月27日 09:08,code hamal 写道:
很多地方都报这个错误
我也报这个错,请问解决了吗?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
我都已经开始在项目中移除他了
请问这么怎么解决?
只要在任意vue文件引用vux就会报:
@snowlotus 小哥问题解决了吗,我和你一样完全克隆官方例子,只是把js的内容内联到vue中,其他没有改动,运行npm run serve出现错误。其中浏览器console出现“打包体积过大”的提示,命令行终端出现@click.native处有错。
@iamziyue 把vux在main.js全局引用就行,不要单独在vue组件里面引用。
这个问题有没有解决的方法
按照示例 https://github.com/airyland/vux/blob/v2/packages/vue-cli-3-example/vue.config.js 配置,如有问题麻烦反馈。
vue-cli3参照示例配置了vue.config.js,vux已成功引入,但是theme.less主题文件无法生效,无法修改主题颜色,目前只能通过/deep/来修改。请问这个怎么配置可以直接修改vux主题变量啊啊?
解决编码后代码中还存在es6的问题 【https://cli.vuejs.org/zh/config/#transpiledependencies 默认情况下 babel-loader 会忽略所有 node_modules 中的文件】 vue.config.js中加入 transpileDependencies: ['vux']
解决了,谢谢!
@airyland什么时候可以支持nuxt2?
同问
同样遇到 ios 9版本报错,怎么解决