Skip to content

plugin to extend options vue.config.js #2090

@cuijing1031

Description

@cuijing1031

What problem does this feature solve?

we have a plugin. This plugin will generate some data into vue.config.js when it is invoked. we can't put this data into package.json, because it depend on some modules. for example:

const path = require('path')
module.exports = {
   css: {
      extract: true,
      loaderOptions: {
        stylus: {
          'resolve url': true,
          import:  [path.resolve(__dirname, './src/theme')]
        }
      }
    }
}

if we use api.render to generate vue.config.js, it can work. But if another plugin generate vue.config.js, the old vue.config.js will be overwrited.

What does the proposed API look like?

maybe like api.injectImports and api.injectRootOptions

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