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

[Feature Request] build 增加 --with-version #55

Closed
beanlee opened this issue Jul 29, 2020 · 6 comments
Closed

[Feature Request] build 增加 --with-version #55

beanlee opened this issue Jul 29, 2020 · 6 comments
Assignees

Comments

@beanlee
Copy link
Member

beanlee commented Jul 29, 2020

🌈 Feature

支持将 version 放在构建在引用路径内,以适应不用 hash 只使用 version 来控制构建产物的场景

理论上 --no-hash 配置平行,互相无影响

@beanlee beanlee self-assigned this Jul 29, 2020
@loveky
Copy link
Member

loveky commented Jul 29, 2020

准备以什么作为version呢

@beanlee
Copy link
Member Author

beanlee commented Jul 30, 2020

准备以什么作为version呢

是 PLUS 业务他们的场景,不用 hash,全用 jdf 那种打包后的路径作为上线产物,我今天想了想直接做成一个插件,不用小火箭本身提供该功能。

https://www.npmjs.com/package/rocketact-plugin-bundle-with-version

另外还写了一个 他们要用的 banner plugin 的,都差不多

https://www.npmjs.com/package/rocketact-plugin-bundle-with-banner

@beanlee
Copy link
Member Author

beanlee commented Jul 30, 2020

准备以什么作为version呢

就以 package.json 中的 version 字段打包,bundle 时追加在 publicPath 后。

@loveky
Copy link
Member

loveky commented Jul 30, 2020

准备以什么作为version呢

就以 package.json 中的 version 字段打包,bundle 时追加在 publicPath 后。

然后把文件名中的hash去掉么?怎么保证 manifest,vendor和app 三个js的一致性呢,

@beanlee
Copy link
Member Author

beanlee commented Jul 30, 2020

准备以什么作为version呢

就以 package.json 中的 version 字段打包,bundle 时追加在 publicPath 后。

然后把文件名中的hash去掉么?怎么保证 manifest,vendor和app 三个js的一致性呢,

哈哈,不用保证 manifest, verdor, app 的一致性,他们的需求是每次都更新版本号,打包出来的新版本路径下文件全量上线。

@beanlee
Copy link
Member Author

beanlee commented Jul 30, 2020

@beanlee beanlee closed this as completed Jul 30, 2020
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

2 participants