cordova-template-framework7-vue-webpack
Version:
Cordova template with framework7, vue 2 and webpack 2.
33 lines (30 loc) • 895 B
JavaScript
const path = require('path');
const webpackMerge = require('webpack-merge');
const commonConfig = require('./webpack.common');
const CordovaHtmlOutputPlugin = require('../webpack/plugins/CordovaHtmlOutputPlugin.js');
const TerserPlugin = require('terser-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
module.exports = function() {
return webpackMerge(commonConfig({ mode: 'production' }), {
module: {
rules: [
{
test: /\.css$/,
loader: ['style-loader', 'css-loader']
}
]
},
plugins: [
new CordovaHtmlOutputPlugin(),
new TerserPlugin({
extractComments: false
}),
new CleanWebpackPlugin({
dry: false,
verbose: false,
cleanOnceBeforeBuildPatterns: ['!index.html'],
cleanAfterEveryBuildPatterns: ['!index.html']
})
]
});
};