-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
34 lines (33 loc) · 983 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
22
23
24
25
26
27
28
29
30
31
32
33
34
const { resolve } = require( 'path' );
const defaultConfig = require( './node_modules/@wordpress/scripts/config/webpack.config.js' );
const WebpackRTLPlugin = require( 'webpack-rtl-plugin' );
const WebpackNotifierPlugin = require( 'webpack-notifier' );
const LicenseWebpackPlugin = require( 'license-webpack-plugin' ).LicenseWebpackPlugin;
const getWebpackEntryPoints = defaultConfig.entry();
module.exports = {
...defaultConfig,
entry: {
...getWebpackEntryPoints,
view: resolve( process.cwd(), process.env.WP_SRC_DIRECTORY, 'view.js' ),
},
plugins: [
...defaultConfig.plugins,
new WebpackRTLPlugin( {
filename: '[name]-rtl.css',
} ),
new LicenseWebpackPlugin( {
outputFilename: '../credits.txt',
preferredLicenseTypes: [ 'GPL', 'MIT', 'ISC' ],
stats: {
warnings: false,
errors: true,
},
} ),
new WebpackNotifierPlugin( {
title: 'Gallery Thumbnails',
emoji: true,
alwaysNotify: true,
skipFirstNotification: true,
} ),
],
};