Skip to content

Fonts are corrupting #123

@bilalmalkoc

Description

@bilalmalkoc

When bundle my app with gulp-zip, fonts getting corrupted. I am fixing this by uploading fonts as manually.

Here is my gulpfile.mjs

import rename from 'gulp-rename'
import gulp from 'gulp'
import gulpZip from 'gulp-zip'
import { homedir } from 'os'

const userHomeDirectory = homedir()
const desktopDir = `${userHomeDirectory}/Desktop`

const pluginFolder = 'production'

export const zip = () => {
  return gulp
    .src(
      [
        '**/*',
        '!node_modules/**',
        '!src/**',
        '!.browserslistrc',
        '!.eslintrc',
        '!eslint.config.mjs',
        '!.prettierrc',
        '!.stylelintrc.json',
        '!gulpfile.js',
        '!gulpfile.mjs',
        '!postcss.config.js',
        '!phpcs.xml.dist',
        '!package.json',
        '!composer.json',
        '!composer.lock',
        '!package-lock.json',
        '!webpack.config.js',
        '!.DS_Store',
        '!README.md',
        '!.idea/**',
        '!.github/**',
        '!.git/**',
        '!**/*.css.map',
        '!**/*.js.map',
      ],
    )
    .pipe(
      rename(function (path) {
        path.dirname = `${pluginFolder}/${path.dirname}`
      })
    )
    .pipe(gulpZip(`${pluginFolder}.zip`, { compress: true }))
    .pipe(gulp.dest(desktopDir))
}

Also tried compress: false. Still same problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions