Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extending entry #846

Closed
Akryum opened this issue Feb 16, 2018 · 1 comment
Closed

Extending entry #846

Akryum opened this issue Feb 16, 2018 · 1 comment

Comments

@Akryum
Copy link
Member

Akryum commented Feb 16, 2018

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()',
  })
})
@yyx990803
Copy link
Member

Closing in favor of #845

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants