Koha/webpack.config.js
Jonathan Druart bb3459cabc
Bug 32806: Rename main.js to erm.js
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:00 -03:00

43 lines
1,020 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/main-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,
}),
],
};