PluginProbe
Stream – Activity Log & Audit Trail / trunk
Stream – Activity Log & Audit Trail vtrunk
4.4.0 4.3.0 4.2.2 4.2.1 trunk 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.1 3.1.1 3.10.0 3.2.0 3.2.1 3.2.2 3.2.3 All 50 releases
stream / webpack.config.js

webpack.config.js in Stream – Activity Log & Audit Trail trunk, at webpack.config.js

57 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * External dependencies
3 */
4 const path = require( 'path' );
5 const CopyPlugin = require( 'copy-webpack-plugin' );
6
7 /**
8 * WordPress dependencies
9 */
10 const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
11
12 module.exports = {
13 ...defaultConfig,
14 entry: {
15 admin: './src/js/admin.js',
16 'admin-exclude': './src/js/admin-exclude.js',
17 'alert-type-highlight': './src/js/alert-type-highlight.js',
18 alerts: './src/js/alerts.js',
19 'alerts-list': './src/js/alerts-list.js',
20 global: './src/js/global.js',
21 'live-updates': './src/js/live-updates.js',
22 settings: './src/js/settings.js',
23 'wpseo-admin': './src/js/wpseo-admin.js',
24 },
25 plugins: [
26 ...defaultConfig.plugins,
27 new CopyPlugin( {
28 patterns: [
29 {
30 from: 'node_modules/select2/dist',
31 // Convert filenames to lowercase.
32 to( { context, absoluteFilename } ) {
33 const baseName = path.basename( absoluteFilename ).toLowerCase();
34 const relativePath = path.relative( context, path.dirname( absoluteFilename ) );
35
36 return path.join( 'select2', relativePath, baseName );
37 },
38 },
39 {
40 from: 'node_modules/timeago/jquery.timeago.js',
41 to: 'timeago/js/jquery.timeago.js',
42 },
43 {
44 from: 'node_modules/timeago/locales',
45 // Convert filenames to lowercase.
46 to( { context, absoluteFilename } ) {
47 const baseName = path.basename( absoluteFilename ).toLowerCase();
48 const relativePath = path.relative( context, path.dirname( absoluteFilename ) );
49
50 return path.join( 'timeago', 'js', 'locales', relativePath, baseName );
51 },
52 },
53 ],
54 } ),
55 ],
56 };
57