Skip to content

Compiled files are changed after each build (even if there are no changes) #2773

Closed
@hivokas

Description

@hivokas
  • Laravel Mix Version: 6.0.9
  • Node Version: v15.2.0
  • NPM Version: 6.14.9
  • OS: macOS

Description:

In the project I'm working on right now we store compiled assets in the repository. We use GitHub Actions to automatically compile assets once changes are pushed to the PR. The problem is that once assets are compiled, the number of changed files in the PR grows up to ~120. I want to find a way to decrease this number.

Steps To Reproduce:

I've created a repository to demonstrate this issue: https://github.com/hivokas/laravel-mix-playground-random-postcss-input-id

What I've noticed so far:

  • it happens only if the Vue component uses TailwindCSS's @apply;
  • if we use @apply, this part of the chunk (the component is imported dynamically via import()) is different after each build (same for chunk's .map file):

image

- looks like this part is `Input#id` generated by PostCSS (https://postcss.org/api/#input-id).

I'm looking for a way to avoid this part being different for each build.

Is there a way to do that from within Laravel Mix? Or I should resubmit this issue to another repo?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions