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

add localAssetsFileDir to cli build option #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fjswhl
Copy link

@fjswhl fjswhl commented Mar 11, 2019

用于解决这个问题 ,不知道这个方法是否可行?

Usage:
再 minapp.json 里添加 localAssetsFileDir 配置

{
  ...
  "compiler": {
    ...
    "localAssetsFileDir": "images"
  }
}

然后 minapp build --useLocalAssetsFile --pretty
就会把 src/images 目录直接拷贝到 dist/images

@qiu8310
Copy link
Owner

qiu8310 commented Mar 11, 2019

思路很好,但有个问题,我当时加上这个 publicPath 主要是因为样式文件不能出现本地的资源

@fjswhl
Copy link
Author

fjswhl commented Mar 12, 2019

嗯,这个只影响 xmal 里的图片路径。用户可以开一个 static 的目录存放xaml里引用的图片。对于样式文件里的图片可以再单独开一个图片目录,然后可以同时使用 useLocalAssetsFile 和 public-path, minapp build --useLocalAssetsFile --pretty --public-path=...

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.

None yet

2 participants