-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
21 lines (19 loc) · 768 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
* Custom webpack configuration for the project.
*
* This creates multiple entry points for the project.
*/
// Import the original config from the @wordpress/scripts package.
const defaultConfig = require('@wordpress/scripts/config/webpack.config');
// Import the helper to find and generate the entry points in the src directory
const { getWebpackEntryPoints } = require('@wordpress/scripts/utils/config');
// Add any a new entry point by extending the webpack config.
module.exports = () => ({
...defaultConfig,
entry: {
...getWebpackEntryPoints(),
api: './assets/js/tempuser-api.js', // to variations file in theme.
'temp-access': './assets/js/index.js', // to variations file in theme.
'tempaccess-css': './assets/sass/tempaccess.scss',
},
});