question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Want to be able to import webpack plugins to the webpack config in vue.config.js

See original GitHub issue

What problem does this feature solve?

Currently there is no way to import new webpack plugins to the vue.config.js. At least not that I know of. Please enlighten me if I’m mistaken. My use case is that I’ve made modifications to an already existing webpack plugin, and I want to use my version instead.

What does the proposed API look like?

// vue.config.js
import NameOfPlugin from 'path/to/plugin';

module.exports = {
  configureWebpack: {
    plugins: [
      new NameOfPlugin()
    ]
  }
};

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
kuceramcommented, Aug 16, 2018

The original docs file linked by @Akryum has moved here: https://github.com/vuejs/vue-cli/blob/dev/docs/guide/webpack.md

2reactions
Akryumcommented, Mar 16, 2018

vuejs.config.js is a file executed by vue-cli and thus nodejs (which doesn’t support import/export syntax yet).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with Webpack | Vue CLI
Some webpack options are set based on values in vue.config.js and should not be mutated directly. For example, instead of modifying output.path ...
Read more >
How to setup Vue.js and webpack
But once you configure it, you can write it like import App from "./App" . // webpack.config.jsconst VueLoaderPlugin = require('vue-loader/lib/plugin')module.
Read more >
How to setup a vue project with webpack. - DEV Community ‍ ‍
Dependencies: first we install vue, vue-router and core-js as dependencies. · file-loader: The file-loader is used to process files like images, ...
Read more >
How to configure Webpack 4 with VueJS : a complete guide
One of my latest responsability has been to upgrade webpack in ... plugin-syntax-dynamic-import is essential to be able to use lazy loading.
Read more >
webpack.config.js and vue.config.js - Stack Overflow
If you created your app with the cli, until you want to add your custom config, you do not need to add those...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found