forked from Authenticator-Extension/Authenticator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
87 lines (86 loc) · 1.74 KB
/
webpack.config.js
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
const path = require("path");
const { VueLoaderPlugin } = require("vue-loader");
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
module.exports = {
mode: "development",
devtool: "source-map",
entry: {
argon: "./src/argon.ts",
background: "./src/background.ts",
content: "./src/content.ts",
popup: "./src/popup.ts",
import: "./src/import.ts",
options: "./src/options.ts",
qrdebug: "./src/qrdebug.ts",
permissions: "./src/permissions.ts",
},
module: {
noParse: /\.wasm$/,
rules: [
{
// argon2-browser overrides
test: /\.wasm$/,
loader: "base64-loader",
type: "javascript/auto"
},
{
test: /\.tsx?$/,
loader: "ts-loader",
options: {
appendTsSuffixTo: [/\.vue$/],
transpileOnly: true
},
exclude: /node_modules/
},
{
test: /\.vue$/,
loader: "vue-loader"
},
{
test: /\.svg$/,
loader: 'vue-svg-loader'
},
{
test: /\.(png|jpe?g|gif)$/,
use: [
{
loader: 'url-loader',
options: {},
}
]
}
],
},
plugins: [
new VueLoaderPlugin(),
new ForkTsCheckerWebpackPlugin({
typescript: {
extensions: {
vue: true
}
}
})
],
resolve: {
extensions: [
".mjs",
".js",
".jsx",
".vue",
".json",
".wasm",
".ts",
".tsx"
],
modules: ["node_modules"],
fallback: {
// Stop argon2-browser from trying to bring in node modules
fs: false,
path: false
}
},
output: {
path: path.resolve(__dirname, "dist"),
publicPath: "/dist/"
}
};