-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathwebpack.config.ts
More file actions
36 lines (29 loc) · 779 Bytes
/
webpack.config.ts
File metadata and controls
36 lines (29 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* eslint-disable n/no-extraneous-import */
const webpackConfig = require("@nextcloud/webpack-vue-config")
const webpackRules = require("@nextcloud/webpack-vue-config/rules")
const isTesting = !!process.env.TESTING
if (isTesting) {
console.debug('TESTING MODE ENABLED')
}
webpackRules.RULE_SVG = {
test: /\.svg$/,
type: 'asset/source',
}
webpackRules.RULE_TS = {
test: /\.tsx?$/,
loader: 'ts-loader',
exclude: /node_modules/,
options: {
appendTsSuffixTo: [/\.vue$/]
}
}
webpackConfig.entry = {
main: "./src/main.ts",
workflow: "./src/workflow.ts"
}
// Replaces rules array
webpackConfig.module.rules = Object.values(webpackRules)
webpackConfig.resolve.extensions.push(".svg")
// Clean dist folder
webpackConfig.output.clean = true
export default webpackConfig