webpack's core configuration is based on creating and modifying a potentially unwieldy JavaScript object. While this is OK for configurations on individual projects, trying to share these objects across projects and make subsequent modifications gets messy. webpack-chain attempts to improve this process by providing a chainable or fluent API for creating and modifying webpack configurations.
Questions tagged [webpack-chain]
11 questions
6
votes
1 answer
webpack configuration: remove hash from *.js entry/bundle files names
I am doing a vue.js app.
After build it generate a js file "background.2a548437.js" instead of the "background.js" that I want.
I'm doing the webpack-chain configuration through the "vue.config.js" file.
To diagnose, I'm reading the result of "$vue…

GuillaumeB
- 392
- 2
- 12
6
votes
3 answers
vue.config.js & webpack 4: override 'exclude' or 'include' of rule
I want to override the exclude / include of a webpack rule. The project has been created with vue-cli-sevice and therefore only has a vue.config.js. I am able to hook into the configuration with chainWebpack, but I'm not able to edit the rule…

Marc Dix
- 1,864
- 15
- 29
4
votes
1 answer
How to use webpack-chain to add appendTsSuffixTo options to ts-loader?
Simply put, how do I use webpack-loader to add the following option to the ts-loader plugin:
options: {
appendTsSuffixTo: [/\.vue$/]
}
Currently I have this setup for ts-loader (the top part is here for context). the bottom config.plugin call is…

Douglas Gaskell
- 9,017
- 9
- 71
- 128
2
votes
1 answer
How do I remove a plugin using webpack-chain?
If I have a resolved Webpack config like this:
...
plugins: [
/* config.plugin('vue-loader') */
new VueLoaderPlugin(),
/* config.plugin('define') */
new DefinePlugin(
{
'process.env': {
NODE_ENV:…

Timmmm
- 88,195
- 71
- 364
- 509
2
votes
1 answer
How to alter a rule with Vue-cli?
From vue-inspect I can read this:
/* config.module.rule('fonts') */
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/i,
use: [
/* config.module.rule('fonts').use('url-loader') */
{
loader: 'url-loader',
options: {
…

nowox
- 25,978
- 39
- 143
- 293
2
votes
1 answer
Write MiniCssExtractPlugin in webpack-chain way
How to write the following in webpack-chain
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
plugins: [
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
…

evgeni fotia
- 4,650
- 3
- 16
- 34
2
votes
0 answers
Use WebpackChain to configure import scss with globs (gridsome or vue-cli)
I have a gridsome project that use webpackchain to configure webpack (just like vue-cli does). I'd like to install scss glob management in my scss files.
I use import-glob-loader
I'm not very familiar to webpack, and the webpackchain syntax confuses…

Vincent Dilly
- 31
- 4
1
vote
0 answers
How can a Vue CLI plugin modify transpileDepencies?
How can my Vue CLI plugin tell babel CLI plugin that a certain dependency in node_modules has to be transpiled?
Even this brute-force attempt failed, though theoretically all files should be transpiled:
module.exports = (api, opts) => {
…

user7465573
- 56
- 4
0
votes
0 answers
Build standalone React component to delivery on CDN using umijs
After building my React application and MyModule I create an html file for test :