-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
38 lines (36 loc) · 1.17 KB
/
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
35
36
37
38
/** @type {import('webpack').defaultConfig} */
const defaultConfig = require('@wordpress/scripts/config/webpack.config');
const { modifyRules } = require('./webpack.utils');
/** @type {import('webpack').Configuration} */
const config = {
...defaultConfig,
plugins: [
...defaultConfig.plugins,
],
module: {
...defaultConfig.module,
rules: [
...modifyRules(defaultConfig.module.rules),
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
};
module.exports = {
...config,
entry: {
'css/dashboard-settings': './resources/scss/dashboard-settings.scss',
'css/degree-program-list-table': './resources/scss/degree-program-list-table.scss',
'ts/degree-program-editor': './resources/ts/degree-program-editor.ts',
'ts/degree-program-list-table': './resources/ts/degree-program-list-table.ts',
'ts/term-meta-fields-validation': './resources/ts/term-meta-fields-validation.ts',
},
output: {
publicPath: './',
path: __dirname + '/assets',
filename: '[name].js',
},
};