075544d3f5
We were getting the following warning in the console: runtime-core.esm-bundler.js:5122 Feature flags VUE_OPTIONS_API, VUE_PROD_DEVTOOLS are not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
43 lines
1,017 B
JavaScript
43 lines
1,017 B
JavaScript
const { VueLoaderPlugin } = require("vue-loader");
|
|
const autoprefixer = require("autoprefixer");
|
|
const path = require("path");
|
|
const webpack = require('webpack');
|
|
|
|
module.exports = {
|
|
entry: {
|
|
main: "./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, "cypress/")],
|
|
},
|
|
{
|
|
test: /\.ts$/,
|
|
loader: 'ts-loader',
|
|
options: {
|
|
appendTsSuffixTo: [/\.vue$/]
|
|
},
|
|
exclude: [path.resolve(__dirname, "cypress/")],
|
|
},
|
|
{
|
|
test: /\.css$/,
|
|
use: ['style-loader', 'css-loader'],
|
|
}
|
|
],
|
|
},
|
|
plugins: [
|
|
new VueLoaderPlugin(),
|
|
new webpack.DefinePlugin({
|
|
__VUE_OPTIONS_API__: true,
|
|
__VUE_PROD_DEVTOOLS__: false,
|
|
}),
|
|
],
|
|
};
|