Comments (7)
npm run dev是起的webpack-dev-server的服务,不会产生文件。dist会在npm run init和npm run build时产生
from vue-vuerouter-webpack.
我是想用这套系统与php的apache合起来用,一开始前后全部分开开发,通过跨域设置之后,接口等是没问题,后期遇到session传递问题,就必须把前端的代码合并到后边服务上发布了,不然session的cookie没法同步过来。,看来监控编译的话,就不能用webpack-dev-server了,得自己配置一个了。
from vue-vuerouter-webpack.
session肯定是在同域下才可以服务端设置和读取。因为webpack主要解决的是前后端完全分离,所以session最好也得分离出来,可以通过header或body传递,前端维护session
from vue-vuerouter-webpack.
通过header或者body传递我就是感觉不太安全,cookie有个httpOnly可以用,还安全一点,还有个方法就是把session甩掉,用token来做,我又嫌麻烦,我再研究研究。
from vue-vuerouter-webpack.
是的,前后端分离下,一般就不用session用token,这和开发原生APP是一样的。如果非用session,你可以开发时用npm run dev,生产时换到同域,想办法兼容一下。
from vue-vuerouter-webpack.
webpack-dev-server运行生成的bundle.js好像是存在内存里的,我用webpack -p来生成bundle.js,但是这个文件不好调试,不知道怎么生成sourceMap文件
from vue-vuerouter-webpack.
我把sessionID扔到header里了,后端手动设置对应的sessionID了,暂时先这样吧,反正内部系统,以后再舍掉session换token了。
from vue-vuerouter-webpack.
Related Issues (16)
- 既然用了 babel 为什么不用 es2015+ 的语法? HOT 1
- 关于引入第三UI方库 HOT 1
- 现在vue2.0和vue-router2.0都出来了,能否配置个2.0的脚手架出来 HOT 5
- npm run build之后的img地址错误 HOT 2
- webpack
- 例子程序在开发环境中,过滤器不生效. HOT 2
- Can you help me?
- I came up with an error when I run the script: npm run dev
- npm run dev报错了 HOT 2
- 引用多个以上组件router.start要怎么改 HOT 1
- 可以新建router.js文件管理路由,并将routers文件夹命名为views HOT 1
- npm run dev 报错 HOT 5
- 关于sass或less报错的问题 HOT 1
- 启动vue-vueRouter-webpack浏览器有些报错。 HOT 1
- npm run build 字体文件路径问题 HOT 1
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 vue-vuerouter-webpack.