Skip to content

Commit

Permalink
fix: update webpack config and types
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Jul 11, 2023
1 parent 54a9808 commit 31f437f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion variants/frontend-base-typescript/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ declare module 'shakapacker' {
import { Configuration } from 'webpack';

export { merge } from 'webpack-merge';
export const webpackConfig: Configuration;
export const globalMutableWebpackConfig: Configuration;
export function generateWebpackConfig(): Configuration;
}

declare module 'shakapacker/package/babel/preset.js' {
Expand Down
4 changes: 2 additions & 2 deletions variants/frontend-base/config/webpack/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { webpackConfig, merge } = require('shakapacker');
const { generateWebpackConfig, merge } = require('shakapacker');
const Dotenv = require('dotenv-webpack');

const customConfig = {
Expand All @@ -14,4 +14,4 @@ const customConfig = {

// See the shakacode/shakapacker README and docs directory for advice on customizing your webpackConfig.

module.exports = merge(webpackConfig, customConfig);
module.exports = merge(generateWebpackConfig(), customConfig);
3 changes: 2 additions & 1 deletion variants/frontend-react-typescript/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ declare module 'shakapacker' {
import { Configuration } from 'webpack';

export { merge } from 'webpack-merge';
export const webpackConfig: Configuration;
export const globalMutableWebpackConfig: Configuration;
export function generateWebpackConfig(): Configuration;
}

declare module 'shakapacker/package/babel/preset.js' {
Expand Down

0 comments on commit 31f437f

Please sign in to comment.