You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notice: A feature request describes a suggested improvement. If you have a debugging or troubleshooting question, please open a discussion on the Discussions Tab. Otherwise, remove this line and fill out the following sections.
Desired behavior:
'use strict';
const { generateWebpackConfig } = require('shakapacker');
const Dotenv = require('dotenv-webpack');
const customConfig = {
plugins: [new Dotenv()],
module: {
rules: [
// ...
]
}
};
// See the shakacode/shakapacker README and docs directory for advice on customizing your webpackConfig.
module.exports = generateWebpackConfig(customConfig);
Actual behavior:
'use strict';
const { generateWebpackConfig, merge } = require('shakapacker');
const Dotenv = require('dotenv-webpack');
const customConfig = {
plugins: [new Dotenv()],
module: {
rules: [
// ...
]
}
};
// See the shakacode/shakapacker README and docs directory for advice on customizing your webpackConfig.
module.exports = merge(generateWebpackConfig(), customConfig);
It feels like a pretty simple win given that generateWebpackConfig is just doing webpackMerge.merge anyway, and this feels like it's in the name too right?
If someone needs to do more advance stuff, they can still use merge directly themselves.
Proposed signature:
function generateWebpackConfig(customConfig?: webpack.Configuration): webpack.Configuration;
Setup environment:
Ruby version: 3.1.0
Rails version: 7.0.0
Shakapacker version: 7.0.2
The text was updated successfully, but these errors were encountered:
@G-Rath this is a great idea so long as the argument is optional and the current functionality is preserved. Or you can say that the default param is an empty object. Please submit and PR and I'll approve,.
Notice: A feature request describes a suggested improvement. If you have a debugging or troubleshooting question, please open a discussion on the Discussions Tab. Otherwise, remove this line and fill out the following sections.
Desired behavior:
Actual behavior:
It feels like a pretty simple win given that
generateWebpackConfig
is just doingwebpackMerge.merge
anyway, and this feels like it's in the name too right?If someone needs to do more advance stuff, they can still use
merge
directly themselves.Proposed signature:
Setup environment:
The text was updated successfully, but these errors were encountered: