@tourmind-frontend/monitor-plugin-nuxt 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +8 -7
- package/dist/index.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -126,18 +126,19 @@ function MonitorModule(options) {
|
|
|
126
126
|
if (!options.clientKey) throw new Error(`${LOG_PREFIX} "clientKey" is required`);
|
|
127
127
|
if (!options.authToken) throw new Error(`${LOG_PREFIX} "authToken" is required`);
|
|
128
128
|
if (!options.commit) throw new Error(`${LOG_PREFIX} "commit" is required`);
|
|
129
|
+
const uploadPlugin = new import_monitor_plugin_webpack.default({
|
|
130
|
+
url: options.url,
|
|
131
|
+
authToken: options.authToken,
|
|
132
|
+
commit: options.commit,
|
|
133
|
+
deferWait: true
|
|
134
|
+
});
|
|
129
135
|
this.extendBuild((config, { isClient, isDev }) => {
|
|
130
136
|
if (isDev || !isClient) return;
|
|
131
137
|
config.devtool = "hidden-source-map";
|
|
132
138
|
config.plugins = config.plugins || [];
|
|
133
|
-
config.plugins.push(
|
|
134
|
-
new import_monitor_plugin_webpack.default({
|
|
135
|
-
url: options.url,
|
|
136
|
-
authToken: options.authToken,
|
|
137
|
-
commit: options.commit
|
|
138
|
-
})
|
|
139
|
-
);
|
|
139
|
+
config.plugins.push(uploadPlugin);
|
|
140
140
|
});
|
|
141
|
+
this.nuxt.hook("build:done", () => uploadPlugin.waitForUpload());
|
|
141
142
|
this.addPlugin({
|
|
142
143
|
src: (0, import_node_path.resolve)(__dirname, "../templates/plugin.client.js"),
|
|
143
144
|
fileName: "monitor-tracking.client.js",
|
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tourmind-frontend/monitor-plugin-nuxt",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Nuxt 2 module that captures runtime errors and uploads sourcemaps to a frontend-monitor server.",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"node": ">=13"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@tourmind-frontend/monitor-plugin-webpack": "^1.
|
|
20
|
+
"@tourmind-frontend/monitor-plugin-webpack": "^1.6.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"nuxt": "^2.4.0",
|