@grafana/create-plugin 5.3.1 → 5.3.3-canary.1069.afa1a66.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/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v5.3.2 (Thu Aug 22 2024)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Create Plugin: Fix missing module.ts in sourcemaps [#1071](https://github.com/grafana/plugin-tools/pull/1071) ([@jackw](https://github.com/jackw))
6
+
7
+ #### Authors: 1
8
+
9
+ - Jack Westbrook ([@jackw](https://github.com/jackw))
10
+
11
+ ---
12
+
1
13
  # v5.3.1 (Wed Aug 21 2024)
2
14
 
3
15
  #### 🐛 Bug Fix
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/create-plugin",
3
- "version": "5.3.1",
3
+ "version": "5.3.3-canary.1069.afa1a66.0",
4
4
  "repository": {
5
5
  "directory": "packages/create-plugin",
6
6
  "url": "https://github.com/grafana/plugin-tools"
@@ -87,5 +87,5 @@
87
87
  "engines": {
88
88
  "node": ">=20"
89
89
  },
90
- "gitHead": "acc595c46c832320e3e90f7db18dd69728b4ecd8"
90
+ "gitHead": "afa1a66b3faaf1655b429e570c40c76236a991c1"
91
91
  }
@@ -22,7 +22,7 @@ const pluginJson = getPluginJson();
22
22
  const cpVersion = getCPConfigVersion();
23
23
 
24
24
  const virtualPublicPath = new VirtualModulesPlugin({
25
- 'node_modules/grafana-public-path.js': `
25
+ 'virtual_modules/grafana-public-path.js': `
26
26
  import amdMetaModule from 'amd-module';
27
27
 
28
28
  __webpack_public_path__ =
@@ -98,6 +98,18 @@ const config = async (env): Promise<Configuration> => {
98
98
 
99
99
  module: {
100
100
  rules: [
101
+ // This must come first in the rules array otherwise it breaks sourcemaps.
102
+ {
103
+ test: /src\/(?:.*\/)?module\.tsx?$/,
104
+ use: [
105
+ {
106
+ loader: 'imports-loader',
107
+ options: {
108
+ imports: `side-effects grafana-public-path`,
109
+ },
110
+ },
111
+ ],
112
+ },
101
113
  {
102
114
  exclude: /(node_modules)/,
103
115
  test: /\.[tj]sx?$/,
@@ -118,17 +130,6 @@ const config = async (env): Promise<Configuration> => {
118
130
  },
119
131
  },
120
132
  },
121
- {
122
- test: /src\/(?:.*\/)?module\.tsx?$/,
123
- use: [
124
- {
125
- loader: 'imports-loader',
126
- options: {
127
- imports: `side-effects grafana-public-path`,
128
- },
129
- },
130
- ],
131
- },
132
133
  {
133
134
  test: /\.css$/,
134
135
  use: ['style-loader', 'css-loader'],
@@ -246,7 +247,7 @@ const config = async (env): Promise<Configuration> => {
246
247
  resolve: {
247
248
  extensions: ['.js', '.jsx', '.ts', '.tsx'],
248
249
  // handle resolving "rootDir" paths
249
- modules: [path.resolve(process.cwd(), 'src'), 'node_modules'],
250
+ modules: [path.resolve(process.cwd(), 'src'), 'node_modules', 'virtual_modules'],
250
251
  unsafeCache: true,
251
252
  },
252
253
  };
@@ -51,6 +51,7 @@
51
51
  "sass-loader": "13.3.1",
52
52
  "style-loader": "3.3.3",
53
53
  "swc-loader": "^0.2.3",
54
+ "terser-webpack-plugin": "^5.3.10",
54
55
  "ts-node": "^10.9.1",
55
56
  "tsconfig-paths": "^4.2.0",
56
57
  "typescript": "4.8.4",