Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax <max@nextcloud.com>2022-05-23 10:19:21 +0300
committerMax <max@nextcloud.com>2022-06-07 20:42:03 +0300
commit6be38d61f0c5450fe765427bb0661de051cb3bb2 (patch)
tree8068db447cb9ee5851853b61dd13b9b2f7be1d37 /webpack.js
parenta7d486474e00ab3460680853705ec082f89a3dac (diff)
webpack: use hardcoded appname for now
The app name `text` in appinfo and the package name `@nextcloud/text in package.json differ. webpack-vue-config reads the app name from package.json. But for bundling we need the one from appinfo. Can be removed after merge of https://github.com/nextcloud/webpack-vue-config/pull/338 or a successor. Signed-off-by: Max <max@nextcloud.com>
Diffstat (limited to 'webpack.js')
-rw-r--r--webpack.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/webpack.js b/webpack.js
index 0195ed04a..648a90139 100644
--- a/webpack.js
+++ b/webpack.js
@@ -11,6 +11,26 @@ webpackConfig.entry = {
webpackConfig.output.chunkFilename = '[id].js?v=[contenthash]'
+// The app name `text` in appinfo
+// and the package name `@nextcloud/text in package.json differ.
+// webpack-vue-config reads the app name from package.json.
+// But for bundling we need the one from appinfo.
+// Can be removed after merge of
+// https://github.com/nextcloud/webpack-vue-config/pull/338
+
+const appName = 'text'
+
+Object.assign(webpackConfig.output, {
+ publicPath: path.join('/apps/', appName, '/js/'),
+ filename: `${appName}-[name].js?v=[contenthash]`,
+ devtoolNamespace: appName,
+ devtoolModuleFilenameTemplate(info) {
+ const rootDir = process.cwd()
+ const rel = path.relative(rootDir, info.absoluteResourcePath)
+ return `webpack:///${appName}/${rel}`
+ },
+})
+
webpackConfig.optimization.chunkIds = 'named'
webpackConfig.optimization.splitChunks.cacheGroups = {
defaultVendors: {