Bug 36755: DBRev 23.12.00.053
[koha.git] / webpack.config.js
1 const { VueLoaderPlugin } = require("vue-loader");
2 const autoprefixer = require("autoprefixer");
3 const path = require("path");
4 const webpack = require('webpack');
5
6 module.exports = {
7   entry: {
8     erm: "./koha-tmpl/intranet-tmpl/prog/js/vue/modules/erm.ts",
9     preservation: "./koha-tmpl/intranet-tmpl/prog/js/vue/modules/preservation.ts",
10     "admin/record_sources": "./koha-tmpl/intranet-tmpl/prog/js/vue/modules/admin/record_sources.ts",
11   },
12   output: {
13     filename: "[name].js",
14     path: path.resolve(__dirname, "koha-tmpl/intranet-tmpl/prog/js/vue/dist/"),
15     chunkFilename: "[name].js",
16   },
17   module: {
18     rules: [
19       {
20         test: /\.vue$/,
21         loader: "vue-loader",
22         exclude: [path.resolve(__dirname, "t/cypress/")],
23       },
24       {
25         test: /\.ts$/,
26         loader: 'ts-loader',
27         options: {
28           appendTsSuffixTo: [/\.vue$/]
29         },
30         exclude: [path.resolve(__dirname, "t/cypress/")],
31       },
32       {
33         test: /\.css$/,
34         use: ['style-loader', 'css-loader'],
35       }
36     ],
37   },
38   plugins: [
39     new VueLoaderPlugin(),
40     new webpack.DefinePlugin({
41       __VUE_OPTIONS_API__: true,
42       __VUE_PROD_DEVTOOLS__: false,
43     }),
44   ],
45 };