aboutsummaryrefslogtreecommitdiffstats
path: root/webpack.common.js
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2022-12-28 15:29:54 +0100
committerJohn Molakvoæ <skjnldsv@protonmail.com>2023-01-04 16:46:14 +0100
commit5b9a8f0407a9e3fe7e00f0fc9284ea986905f1b5 (patch)
tree1363678dab6ed5e1554a7a74bc8a6a1a55bdf785 /webpack.common.js
parent8f1bf13ae3046400ce6248fb13e5515e8e9ed5c4 (diff)
downloadnextcloud-server-5b9a8f0407a9e3fe7e00f0fc9284ea986905f1b5.tar.gz
nextcloud-server-5b9a8f0407a9e3fe7e00f0fc9284ea986905f1b5.zip
Add component testing
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'webpack.common.js')
-rw-r--r--webpack.common.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/webpack.common.js b/webpack.common.js
index 871218b8fa9..002ffd06e61 100644
--- a/webpack.common.js
+++ b/webpack.common.js
@@ -23,7 +23,7 @@ const formatOutputFromModules = (modules) => {
}
const modulesToBuild = () => {
- const MODULE = process.env.MODULE
+ const MODULE = process?.env?.MODULE
if (MODULE) {
if (!modules[MODULE]) {
throw new Error(`No module "${MODULE}" found`)
@@ -49,7 +49,7 @@ module.exports = {
// leak local paths https://github.com/webpack/webpack/issues/3603
devtoolNamespace: 'nextcloud',
devtoolModuleFilenameTemplate(info) {
- const rootDir = process.cwd()
+ const rootDir = process?.cwd()
const rel = path.relative(rootDir, info.absoluteResourcePath)
return `webpack:///nextcloud/${rel}`
},
@@ -163,6 +163,11 @@ module.exports = {
Buffer: ['buffer', 'Buffer'],
}),
],
+ externals: {
+ OC: 'OC',
+ OCA: 'OCA',
+ OCP: 'OCP',
+ },
resolve: {
alias: {
// make sure to use the handlebar runtime when importing