lint: format webpack.js with prettier
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/602/head
parent
48b417db0a
commit
7111c7c0e9
29
webpack.js
29
webpack.js
|
@ -1,10 +1,10 @@
|
|||
const webpackConfig = require('@nextcloud/webpack-vue-config')
|
||||
const WorkboxPlugin = require('workbox-webpack-plugin')
|
||||
const path = require('path')
|
||||
const TerserPlugin = require('terser-webpack-plugin')
|
||||
const webpackConfig = require('@nextcloud/webpack-vue-config');
|
||||
const WorkboxPlugin = require('workbox-webpack-plugin');
|
||||
const path = require('path');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
|
||||
const buildMode = process.env.NODE_ENV
|
||||
const isDev = buildMode === 'development'
|
||||
const buildMode = process.env.NODE_ENV;
|
||||
const isDev = buildMode === 'development';
|
||||
|
||||
webpackConfig.module.rules.push({
|
||||
test: /\.ts?$/,
|
||||
|
@ -16,8 +16,8 @@ webpackConfig.module.rules.push({
|
|||
});
|
||||
webpackConfig.resolve.extensions.push('.ts');
|
||||
webpackConfig.resolve.alias = {
|
||||
'vue$': 'vue/dist/vue.esm.js',
|
||||
}
|
||||
vue$: 'vue/dist/vue.esm.js',
|
||||
};
|
||||
webpackConfig.entry.main = path.resolve(path.join('src', 'main'));
|
||||
|
||||
webpackConfig.watchOptions = {
|
||||
|
@ -33,19 +33,16 @@ webpackConfig.plugins.push(
|
|||
);
|
||||
|
||||
// Exclusions from minification
|
||||
const minifyExclude = [
|
||||
/filerobot-image-editor/,
|
||||
]
|
||||
const minifyExclude = [/filerobot-image-editor/];
|
||||
|
||||
webpackConfig.optimization.minimizer[0] =
|
||||
new TerserPlugin({
|
||||
webpackConfig.optimization.minimizer[0] = new TerserPlugin({
|
||||
exclude: minifyExclude,
|
||||
terserOptions: {
|
||||
output: {
|
||||
comments: false,
|
||||
}
|
||||
},
|
||||
},
|
||||
extractComments: true,
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = webpackConfig
|
||||
module.exports = webpackConfig;
|
||||
|
|
Loading…
Reference in New Issue