【Lara - vue】在 wamp 环境下从零搭建

创建指定版本的 laravel 项目
composer create-project laravel/laravel=5.5 social --prefer-dist

chrome 浏览器升级版本后,默认添加 https
// enable https in wamp
下载 windows 版本的 openssl
Download OpenSSL – Shining Light Productions
read more

WARNING: can't open config file: /usr/local/ssl/openssl.cnf
Loading 'screen' into random state - done
Generating RSA private key, 1024 bit long modulus
.........++++++
.........................................++++++
unable to write 'random state'
e is 65537 (0x10001)

在 cmd 窗口输入
set OPENSSL_CONF=[path-to-OpenSSL-install-dir]\bin\openssl.cfg
[path-to-OpenSSL-install-dir] 为 openssl 安装路径

我进行该操作后并没有生效,依旧无法找到配置文件路径,手动设置 windows 环境变量

OPENSSL_CONF=c:\OpenSSL-Win64\bin\openssl.cfg

generate a self-signed certificate

参照 Download OpenSSL – Shining Light Productions 博客文章,一步一步的修改配置文件就可以配置成功啦

配置 package.json 和 webpack.mix.js 文件

npm install
npm run watch

报错

Module build failed: SyntaxError: 
D:/wamp64/www/social/resources/assets/js/router/index.js: 
Unexpected token (11:19)

const AppRoute = {
  path: '/',
  component: () => import('../App.vue'),
  children: [dashboard]
};


component: () => import('../App.vue')
这种写法提示语法错误,换成另外一种写法
component: '../App.vue'

resource/assets/sass/home.scss

@import "vendor/select2.min";
npm run watch 时该文件编译报错,感觉也没有什么地方必须用到这个文件,先给注释掉

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容