Skip to content

postProcessFiles files arg is an empty object #873

Closed
@maurop123

Description

@maurop123

Version

3.0.0-alpha.13

Reproduction link

https://github.com/maurop123/vuecli3-test

Steps to reproduce

Starting from a project generated with vue cli 3

  1. npm i -D cli-plugin-foobar
  2. vue invoke cli-plugin-foobar
  3. open files.txt. should see files: {}

Or with pwa plugin...

  1. npm i -D @vue/cli-plugin/pwa
  2. vue invoke pwa
  3. notice that main.js wasn't updated although it should have been

What is expected?

In postProcessFiles(files => of generator API, the files args should contain the existing files.... right?

What is actually happening?

In postProcessFiles(files => of generator API, the files args is an empty object.


I was trying to add an import statement in main.js. I noticed that the pwa plugin seems to have the same code. When I tried running it, I noticed that main.js wasn't updated.

Where pwa generator index.js checks if (main), main is probably undefined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationenhancementintend to implementThe team has the intention to implement this feature at some point. Contribution is also welcome.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions