2020-04-18 11:04:31 +03:00
|
|
|
/**
|
|
|
|
* Nextcloud Cookbook app
|
|
|
|
* Main Webpack configuration file.
|
|
|
|
* Different configurations for development and build runs
|
|
|
|
* are located in the appropriate files.
|
|
|
|
*/
|
|
|
|
const path = require('path')
|
2021-12-07 17:33:44 +03:00
|
|
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
|
2020-04-18 11:04:31 +03:00
|
|
|
|
2022-03-06 21:39:16 +03:00
|
|
|
const webpack = require('webpack')
|
|
|
|
const webpackConfig = require('@nextcloud/webpack-vue-config')
|
|
|
|
const { merge } = require('webpack-merge')
|
|
|
|
const { env } = require('process')
|
2020-04-18 11:04:31 +03:00
|
|
|
|
2022-03-06 21:39:16 +03:00
|
|
|
module.exports = (env) => { return merge(webpackConfig, {
|
2021-12-07 16:54:34 +03:00
|
|
|
entry: {
|
2022-03-06 21:39:16 +03:00
|
|
|
guest: path.resolve(path.join('src', 'guest.js')),
|
2020-04-18 11:04:31 +03:00
|
|
|
},
|
2022-03-07 13:29:45 +03:00
|
|
|
// You can add this to allow acces in the network. You will have to adopt the public path in main.js as well!
|
|
|
|
// devServer: {
|
|
|
|
// host: "0.0.0.0",
|
|
|
|
// },
|
2020-11-20 11:33:57 +03:00
|
|
|
plugins: [
|
2021-12-07 16:54:34 +03:00
|
|
|
new CleanWebpackPlugin(),
|
2022-03-06 21:39:16 +03:00
|
|
|
new webpack.DefinePlugin({
|
|
|
|
'__webpack_use_dev_server__': env.dev_server || false,
|
|
|
|
}),
|
2020-11-20 11:33:57 +03:00
|
|
|
],
|
2022-03-06 21:39:16 +03:00
|
|
|
}) }
|
|
|
|
|