Comments (5)
看下面代码,虽然项目里没有 import Vue from 'vue'\n
,但是事实上编译时加了
const getEntryFileContent = (source, routerpath) => {
let dependence = `import Vue from 'vue'\n`;
······
const getEntryFile = () => {
const entryFile = path.join(vueWebTemp, config.entryFilePath)
const routerFile = path.join(vueWebTemp, config.routerFilePath)
const storeFile = path.join(vueWebTemp, config.storeFilePath)
fs.outputFileSync(entryFile, getEntryFileContent(helper.root(config.entryFilePath), routerFile));
fs.outputFileSync(routerFile, getRouterFileContent(helper.root(config.routerFilePath)));
fs.outputFileSync(storeFile, getRouterFileContent(helper.root(config.storeFilePath)));//他
return {
index: entryFile
}
}
源文件
https://github.com/CarGuo/GSYGithubAppWeex/blob/46c253b48126ac5dba14bd8e0b08a8c50824e816/src/store.js
效果文件
https://github.com/CarGuo/GSYGithubAppWeex/blob/46c253b48126ac5dba14bd8e0b08a8c50824e816/.temp/store.js
from gsygithubappweex.
编译后的store.js是有import Vue的
但是项目运行的文件还是用的源文件
入口文件引的也是编译后的文件,还是报错我就是想不通哪里出了问题
from gsygithubappweex.
直接用你项目的配置也是不行,但是你的项目是可以,感觉是人品问题
from gsygithubappweex.
很明显你白色图里的打包进去的js代码里没有 vue
from gsygithubappweex.
就是没有啊就报错了,web环境下打包进去的还是store.js的源文件。并不是编译好的.temp里的store.js文件,但是删掉.temp文件夹里的store.js又会报错:没找到store.js。我是真的不知道哪里出了问题,先不纠结了,打包web运行的文件先自己手动加下import Vue 吧
from gsygithubappweex.
Related Issues (20)
- 登陸的賬戶是github? HOT 1
- 根据 GSYGithubAppWeex 步骤配置多页面App出现错误,Web显示正常 HOT 3
- weex debug ios扫码空白 HOT 5
- Utils.env已经失效 HOT 2
- ios模拟器登陆失败 HOT 3
- 请问启动时出现问题 HOT 2
- weex run android
- wxc-taber 嵌套Vue页面在 Web 端不显示
- ttt
- 安卓首页 render error :-2013
- 应用过期了? HOT 1
- 缺少文件,Error: Can't resolve '../common/ignoreConfig' HOT 2
- weex-ui中util工具有文档吗 HOT 2
- 如果出现登陆失败或者请求失败
- 天空
- 您好,请问安卓上是怎么实现box-shadow的?
- 能否结合项目写一篇博客全面的分析RN、Flutter和Weex开发的优缺点? HOT 2
- 登录密码帐号是多少呀
- 1. 关于APK登陆无效问题 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gsygithubappweex.