Want to be able to import webpack plugins to the webpack config in vue.config.js
See original GitHub issueWhat 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:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The original docs file linked by @Akryum has moved here: https://github.com/vuejs/vue-cli/blob/dev/docs/guide/webpack.md
vuejs.config.js
is a file executed by vue-cli and thus nodejs (which doesn’t support import/export syntax yet).