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

feat: support setPublicPath with env SET_PUBLIC_PATH #633

Merged
merged 1 commit into from
Mar 1, 2018

Conversation

sorrycc
Copy link
Owner

@sorrycc sorrycc commented Mar 1, 2018

close #630

@sorrycc sorrycc merged commit 9ecfcfc into master Mar 1, 2018
@sorrycc sorrycc deleted the feat/set-public-path branch March 1, 2018 10:41

// add setPublicPath
const setPublicPathFile = join(__dirname, '../../template/setPublicPath.js');
if (process.env.SET_PUBLIC_PATH) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请问,我已经添加 SET_PUBLIC_PATH 环境变量,为何 本地访问 webpack_public_path 还是 undefined
我是模板与资源2台服务器, 运行时设置__webpack_public_path__ 应该就是用这个方案吧?
这是我的代码,在index.js最上方 引入,可以帮忙看看么
image

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

Successfully merging this pull request may close these issues.

setPublicPath for __webpack_public_path__
2 participants