Skip to content

Extending entry #846

Closed
Closed
@Akryum

Description

@Akryum

There are a lot of cases where we need to modify the main.js file (or main.ts). For example importing modules, adding options to the instance and such.

Proposed API:

// Generator
api.extendScript('./src/main', file => {
  // Import a file
  file.import('{ apolloProvider }', './vue-apollo')
  // Direct import
  file.import('./style.css')
  // Add an option to the instance
  file.extendOptions({
    provide: 'apolloProvider.provide()',
  })
})

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions