You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.0 KiB
JavaScript
38 lines
1.0 KiB
JavaScript
// Load the default @wordpress/scripts config object
|
|
const path = require( 'path' );
|
|
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
|
|
|
|
// Use the defaultConfig but replace the entry and output properties
|
|
module.exports = {
|
|
...defaultConfig,
|
|
entry: {
|
|
'dashboard-app': path.resolve(
|
|
__dirname,
|
|
'assets/src/DashboardApp.js'
|
|
),
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
...defaultConfig.resolve.alias,
|
|
'@DashboardApp': path.resolve( __dirname, 'assets/src/dashboard-app/' ),
|
|
'@Admin': path.resolve( __dirname, 'assets/src/' ),
|
|
'@Utils': path.resolve( __dirname, 'assets/src/utils/' ),
|
|
'@Skeleton': path.resolve( __dirname, 'assets/src/common/skeleton/' ),
|
|
'@Common': path.resolve( __dirname, 'assets/src/common/' ),
|
|
},
|
|
},
|
|
output: {
|
|
filename: '[name].js',
|
|
path: path.resolve( __dirname, 'assets/build' ),
|
|
},
|
|
plugins: [
|
|
// ...defaultConfig.plugins,
|
|
...defaultConfig.plugins.filter( function ( plugin ) {
|
|
if ( plugin.constructor.name === 'LiveReloadPlugin' ) {
|
|
return false;
|
|
}
|
|
return true;
|
|
} ),
|
|
],
|
|
};
|