2024-05-29 17:11:53 +02:00
|
|
|
const webpackConfig = require('@nextcloud/webpack-vue-config')
|
|
|
|
const ESLintPlugin = require('eslint-webpack-plugin')
|
|
|
|
const StyleLintPlugin = require('stylelint-webpack-plugin')
|
|
|
|
const path = require('path')
|
|
|
|
|
|
|
|
webpackConfig.entry = {
|
|
|
|
main: { import: path.join(__dirname, 'src', 'main.js'), filename: 'main.js' },
|
|
|
|
}
|
|
|
|
|
|
|
|
webpackConfig.plugins.push(
|
|
|
|
new ESLintPlugin({
|
|
|
|
extensions: ['js', 'vue'],
|
|
|
|
files: 'src',
|
|
|
|
}),
|
|
|
|
)
|
2024-05-30 00:18:50 +02:00
|
|
|
|
2024-05-29 17:11:53 +02:00
|
|
|
webpackConfig.plugins.push(
|
|
|
|
new StyleLintPlugin({
|
|
|
|
files: 'src/**/*.{css,scss,vue}',
|
|
|
|
}),
|
|
|
|
)
|
|
|
|
|
|
|
|
webpackConfig.module.rules.push({
|
|
|
|
test: /\.svg$/i,
|
|
|
|
type: 'asset/source',
|
|
|
|
})
|
|
|
|
|
2024-05-30 00:18:50 +02:00
|
|
|
webpackConfig.devtool =
|
|
|
|
webpackConfig.mode !== 'production' ? webpackConfig.devtool : false
|
|
|
|
|
2024-05-29 17:11:53 +02:00
|
|
|
module.exports = webpackConfig
|