mirror of
https://github.com/nextcloud/app_api.git
synced 2026-01-13 20:19:21 +00:00
Finally dropping NC27 support since AppAPI 3.2.0. Changelog in #373 Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
42 lines
1.1 KiB
JavaScript
42 lines
1.1 KiB
JavaScript
const path = require('path')
|
|
const webpackConfig = require('@nextcloud/webpack-vue-config')
|
|
const ESLintPlugin = require('eslint-webpack-plugin')
|
|
const StyleLintPlugin = require('stylelint-webpack-plugin')
|
|
|
|
const buildMode = process.env.NODE_ENV
|
|
const isDev = buildMode === 'development'
|
|
webpackConfig.devtool = isDev ? 'cheap-source-map' : 'source-map'
|
|
|
|
webpackConfig.stats = {
|
|
colors: true,
|
|
modules: false,
|
|
}
|
|
|
|
webpackConfig.output.clean = {
|
|
// keep js/proxy_js folder
|
|
keep: 'proxy_js',
|
|
}
|
|
|
|
const appId = 'app_api'
|
|
webpackConfig.entry = {
|
|
main: { import: path.join(__dirname, 'src', 'main.js'), filename: appId + '-main.js' },
|
|
adminSettings: { import: path.join(__dirname, 'src', 'adminSettings.js'), filename: appId + '-adminSettings.js' },
|
|
filesplugin: { import: path.join(__dirname, 'src', 'filesplugin.js'), filename: appId + '-filesplugin.js' },
|
|
}
|
|
|
|
webpackConfig.plugins.push(
|
|
new ESLintPlugin({
|
|
extensions: ['js', 'vue'],
|
|
files: 'src',
|
|
failOnError: !isDev,
|
|
})
|
|
)
|
|
webpackConfig.plugins.push(
|
|
new StyleLintPlugin({
|
|
files: 'src/**/*.{css,scss,vue}',
|
|
failOnError: !isDev,
|
|
}),
|
|
)
|
|
|
|
module.exports = webpackConfig
|