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:
-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: {