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

打包npm发布包 设置chunkFilename失效 vue-cli-service build --target lib --name base --dest lib src/index.js #4470

Open
purestart opened this issue Aug 20, 2019 · 1 comment

Comments

@purestart
Copy link

Version

3.8.3

Environment info

window 10
Node v9.11.1

Steps to reproduce

使用命令 vue-cli-service build --target lib --name base --dest lib src/index.js 打包一个库
其中组件使用了 /* webpackChunkName: “” */分包
vue.config.js中设置了 chunkFilename

chainWebpack: config => {
config.output.filename('[name].js')
config.output.chunkFilename('[name].[chunkhash:8].js')
但是打包出来的文件没有chunkhash
请问如何解决呢?

What is expected?

vue-cli-service build --target lib --name base --dest lib src/index.js 打包的时候能够配置chunkFilename

What is actually happening?

vue-cli-service build --target lib --name base --dest lib src/index.js 打包的时候配置chunkFilename不生效


使用命令 vue-cli-service build --target lib --name base --dest lib src/index.js 打包一个库
其中组件使用了 /* webpackChunkName: “” */分包
vue.config.js中设置了 chunkFilename

chainWebpack: config => {
config.output.filename('[name].js')
config.output.chunkFilename('[name].[chunkhash:8].js')
但是打包出来的文件没有chunkhash
请问如何解决呢?

@purestart purestart changed the title 打包发布包 设置chunkFilename失效 vue-cli-service build --target lib --name base --dest lib src/index.js 打包npm发布包 设置chunkFilename失效 vue-cli-service build --target lib --name base --dest lib src/index.js Aug 20, 2019
@cy0131
Copy link

cy0131 commented Jun 22, 2020

遇到同样的问题,同求解决方法

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

No branches or pull requests

3 participants