chore(webpack): Move to shared code for entrypoints and use webpack serve public path
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
committed by
backportbot-nextcloud[bot]
parent
cfd0fc828f
commit
083db2f3b6
@@ -1,11 +1,11 @@
|
||||
const webpackConfig = require('@nextcloud/webpack-vue-config')
|
||||
const webpack = require('webpack')
|
||||
const path = require('path')
|
||||
const ESLintPlugin = require('eslint-webpack-plugin')
|
||||
const StyleLintPlugin = require('stylelint-webpack-plugin')
|
||||
|
||||
const buildMode = process.env.NODE_ENV
|
||||
const isDev = buildMode === 'development'
|
||||
const isDevServer = process.env.WEBPACK_DEV_SERVER;
|
||||
const isDevServer = process.env.WEBPACK_SERVE
|
||||
|
||||
webpackConfig.entry = {
|
||||
...webpackConfig.entry,
|
||||
@@ -18,6 +18,11 @@ webpackConfig.entry = {
|
||||
|
||||
if (isDevServer) {
|
||||
webpackConfig.output.publicPath = 'http://127.0.0.1:3000/'
|
||||
webpackConfig.plugins.push(
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.WEBPACK_SERVE': true,
|
||||
})
|
||||
)
|
||||
} else {
|
||||
webpackConfig.stats = {
|
||||
context: path.resolve(__dirname, 'src'),
|
||||
|
||||
Reference in New Issue
Block a user