tsrot / react-zhihu

这是一个模仿知乎界面的简单React demo。这个React demo能让你从零开始学习React,并逐渐掌握React。它包括了一个项目从零到项目完成的整个过程。

Home Page:http://blog.xieliqun.com/react-zhihu/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build打包之后的文件路径有错误

the-last opened this issue · comments

用gulp将编译后的脚本、资源文件、index.html 拷贝到dist里

  gulp.task('copy', function () {
	gulp.src('./app/css/*')
	.pipe(gulp.dest('./dist/css'));

	gulp.src('./bower_components/**/*')
	.pipe(gulp.dest('./dist/libs'));

	gulp.src('./*.html')
	.pipe(gulp.dest('./dist'));
});

问题描述:
打包前 index.html 引用脚本的路径为:/dist/js/main.js
build之后 index.html 位置放在了dist目录下,/dist/js/main.js 这个引用路劲失效了。
预期效果: dist文件下存放的build之后的项目,应该是完整可用的。

谢谢!