Koha/webpack.config.js
Jonathan Druart a8847a0d1d
Bug 32806: Move main-erm.ts to modules/erm.ts
Looks fine.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-02-27 11:12:01 -03:00

43 lines
1,023 B
JavaScript

const { VueLoaderPlugin } = require("vue-loader");
const autoprefixer = require("autoprefixer");
const path = require("path");
const webpack = require('webpack');
module.exports = {
entry: {
erm: "./koha-tmpl/intranet-tmpl/prog/js/vue/modules/erm.ts",
},
output: {
filename: "[name].js",
path: path.resolve(__dirname, "koha-tmpl/intranet-tmpl/prog/js/vue/dist/"),
chunkFilename: "[name].js",
},
module: {
rules: [
{
test: /\.vue$/,
loader: "vue-loader",
exclude: [path.resolve(__dirname, "t/cypress/")],
},
{
test: /\.ts$/,
loader: 'ts-loader',
options: {
appendTsSuffixTo: [/\.vue$/]
},
exclude: [path.resolve(__dirname, "t/cypress/")],
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
}
],
},
plugins: [
new VueLoaderPlugin(),
new webpack.DefinePlugin({
__VUE_OPTIONS_API__: true,
__VUE_PROD_DEVTOOLS__: false,
}),
],
};