forked from ampproject/amp-wp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
33 lines (31 loc) · 912 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
/* global require, module, __dirname */
const path = require( 'path' );
module.exports = {
entry: {
'./assets/js/amp-blocks-compiled': './blocks/index.js',
'./assets/js/amp-block-editor-toggle-compiled': './assets/src/amp-block-editor-toggle',
'./assets/js/amp-validation-detail-toggle-compiled': './assets/src/amp-validation-detail-toggle',
'./assets/js/amp-validation-tooltips-compiled': './assets/src/amp-validation-tooltips',
'./assets/js/amp-validation-single-error-url-details-compiled': './assets/src/amp-validation-single-error-url-details'
},
output: {
path: path.resolve( __dirname ),
filename: '[name].js'
},
externals: {
// Make localized data importable.
'amp-validation-i18n': 'ampValidationI18n'
},
devtool: 'cheap-eval-source-map',
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules)/,
use: {
loader: 'babel-loader'
}
}
]
}
};