Created
August 28, 2023 02:22
-
-
Save zakariabinsaifullah/3c864dfe3ce37285f7759b2428f5f194 to your computer and use it in GitHub Desktop.
webpack config for gutenberg block development
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const defaultConfig = require('@wordpress/scripts/config/webpack.config'); | |
const { getWebpackEntryPoints } = require('@wordpress/scripts/utils/config'); | |
module.exports = { | |
...defaultConfig, | |
entry: { | |
...getWebpackEntryPoints(), | |
'global/global': path.resolve(process.cwd(), 'src', 'global', 'index.js') | |
}, | |
output: { | |
...defaultConfig.output, | |
filename: '[name].js', | |
path: path.resolve(process.cwd(), 'build') | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment