-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathwebpack.config.js
44 lines (42 loc) · 1.16 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
39
40
41
42
43
44
import TerserPlugin from "terser-webpack-plugin";
import path from "path";
import * as url from 'url';
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
export default (env, argv) => ({
optimization: {
minimizer: [
new TerserPlugin({
parallel: true,
terserOptions: {
output: {
comments: false,
},
},
extractComments: false,
}),
],
},
entry: {
"SpreadsheetDataInput": path.join(__dirname, "/Resources/Private/Assets/JavaScript/main.js"),
},
module: {
rules: [
{
test: /\.(js)$/,
exclude: /node_modules/,
use: [
"babel-loader",
],
}
]
},
output: {
filename: "[name].js",
libraryTarget: "amd",
path: path.join(__dirname, "/Resources/Public/JavaScript"),
publicPath: argv.mode !== "production" ? "/" : "../dist/"
},
externals: {
"DocumentService": "TYPO3/CMS/Core/DocumentService",
}
});