We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在public文件夹里放一个js文件,然后下载插件 https:/vbenjs/vite-plugin-compression
npm i vite-plugin-compression
然后在farm.config.ts新增内容
import viteCompression from 'vite-plugin-compression'; export default defineConfig({ vitePlugins: [ viteCompression({ algorithm: "brotliCompress" }), viteCompression({ algorithm: "gzip" }), ]
然后 npm run build ,再查看dist文件夹,会发现刚才放在public文件夹的js文件被复制到dist之后并没有被压缩。
npm run build
该bug不会在vite出现,例如 https:/BCSPanel/frontend-login2
https:/BCSPanel/frontend-antd
由此推断可能是时序问题造成的,在构建完成之后,运行插件之前,没有复制public文件夹
System: OS: Windows 10 10.0.19045 CPU: (12) x64 Intel(R) Core(TM) i5-10600KF CPU @ 4.10GHz Memory: 52.35 GB / 63.86 GB Binaries: Node: 20.12.1 - C:\Program Files\nodejs\node.EXE npm: 10.8.3 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Chromium (127.0.2651.74) Internet Explorer: 11.0.19041.4355 npmPackages: @farmfe/core: ^1.3.0 => 1.3.20
The text was updated successfully, but these errors were encountered:
目前 public 文件夹会在 build 之后复制到 dist 目录, 这块我们改一下
Sorry, something went wrong.
改成构建之前复制应该就行了
No branches or pull requests
Steps to reproduce
在public文件夹里放一个js文件,然后下载插件 https:/vbenjs/vite-plugin-compression
然后在farm.config.ts新增内容
然后
npm run build
,再查看dist文件夹,会发现刚才放在public文件夹的js文件被复制到dist之后并没有被压缩。该bug不会在vite出现,例如 https:/BCSPanel/frontend-login2
Reproduce link
https:/BCSPanel/frontend-antd
What is actually happening?
由此推断可能是时序问题造成的,在构建完成之后,运行插件之前,没有复制public文件夹
System Info
The text was updated successfully, but these errors were encountered: