eugenecn / vue-ssr-template Goto Github PK
View Code? Open in Web Editor NEWVue.js2.x 服务端渲染脚手架,拿来即用。
Vue.js2.x 服务端渲染脚手架,拿来即用。
<style lang="scss" scoped>
.active {
background-color: blue;
width: 300px;
}
</style>
vue-loader-config.js中第8行添加如下代码:
sass: ExtractTextPlugin.extract({ fallback: 'vue-style-loader', use: 'css-loader!sass-loader' }),
scss: ExtractTextPlugin.extract({ fallback: 'vue-style-loader', use: 'css-loader!sass-loader' }),
======
错误如下:
Module not found: Error: Can't resolve 'scss-loader' in '...projectDir/src/views/home.vue'
疑惑
npm run build:client 和 npm run dev时都不报错
npm run build:server时才会报错
请问这是什么原因?
看到项目使用了bootstrap 和 jQuery 想了解下这个项目的使用场景和选择这两个插件的原因,
虽然jQuery的有些插件确实丰富且不可替代,由于vue等新技术的出现,目前已经有挺长时间没有写jQuery了。
"axios": "^0.17.1",
"fastclick": "^1.0.6",
"js-cookie": "^2.2.0",
"vconsole": "^3.1.0",
"vue": "^2.5.2",
"vue-i18n": "^7.4.0",
"vue-router": "^3.0.1",
"vue-socket.io": "^2.1.1-b",
"vuex": "^3.0.1",
"vuex-i18n": "^1.10.4",
"vux": "^2.7.7"
vux 后期可能弃用,在移动端应该如何架构服务端渲染
为何项目没有 .postcssrc.js
文件
module.exports = {
"plugins": {
"postcss-import": {},
"postcss-url": {},
"postcss-aspect-ratio-mini": {},
"postcss-write-svg": {
utf8: false
},
"postcss-cssnext": {},
"postcss-px-to-viewport": {
viewportWidth: 750, // (Number) The width of the viewport.
viewportHeight: 1334, // (Number) The height of the viewport.
unitPrecision: 3, // (Number) The decimal numbers to allow the REM units to grow to.
viewportUnit: 'vw', // (String) Expected units.
selectorBlackList: ['.ignore', '.hairlines'], // (Array) The selectors to ignore and leave as px.
minPixelValue: 1, // (Number) Set the minimum pixel value to replace.
mediaQuery: false // (Boolean) Allow px to be converted in media queries.
},
"postcss-viewport-units":{},
"cssnano": {
preset: "advanced",
autoprefixer: false,
"postcss-zindex": false
},
}
}
加上loader webpack 配置了也不管用
请问项目部署时,build成dist文件,然后安装依赖pm2启动后,如何访问这个项目?地址应该写哪个呢?
不管是dev运行,还是build构建都会报错
我网站用了cnzz的统计,但是加上代码后没有办法成功统计到数据,请问要统计PV的话,代码该怎么写
是每隔一段时间就执行一下server.js?
pm2 show 看到的信息update time是18s,也就是18s就自动更新一次?
找了一圈api,没找到设置不自动update,而是手动pm2 update的相关配置项。
如何让它当有文件更新的时候才自动update呢??
emmm.... Unitech/pm2#2182 (comment)
似乎暂时没有解决办法
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.