Skip to content

File in root directory #285

@panayotoff

Description

@panayotoff

Hi;

I'm new to Vue and I'm using it with vue-cli and webpack;
In the app I'm using I want to create and register service worker ( single sw.js file ) in the root directory of the project under development and also to copy it to the root dist folder ( the same level as index.html ) on building for production. I tried different webpack configs, but with no succes.
Any help will be appreciated.

I 'worked-around' it by editing /config/index.js file and setting the assetsSubDirectory path to empty string, so all my assets are served in the same directory as the index file, but is it possible to to it for single file?

Also I think a lot of other people will run the same issue when building progressive web apps, so it will be great if you also add the answer to the docs.

Best,
Chris

Metadata

Metadata

Assignees

No one assigned

    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