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

图片打包路径错误 #5

Open
realwugang opened this issue Jan 9, 2021 · 1 comment
Open

图片打包路径错误 #5

realwugang opened this issue Jan 9, 2021 · 1 comment

Comments

@realwugang
Copy link
Collaborator

https://github.com/nil-build/packez/blob/master/src/webpack/getWebpackModules.js

const mediaPublicPath = _.get(
      opts,
      "assets.media.publicPath",
      opts.publicPath
);

使用默认配置时,打包后图片的路径为当前/css/${opts.publicPath}media/xxxx

@realwugang
Copy link
Collaborator Author

当前通过如下配置解决

assets: {
	media: {
		publicPath: "../media",
	}
},

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