Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
the-last opened this issue Nov 30, 2017 · 0 comments
Open

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

the-last opened this issue Nov 30, 2017 · 0 comments

Comments

@the-last
Copy link

the-last commented Nov 30, 2017

用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之后的项目,应该是完整可用的。

谢谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant