We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e54ebff commit 306a8f0Copy full SHA for 306a8f0
packages/@lwc/rollup-plugin/src/__tests__/index.spec.ts
@@ -0,0 +1,7 @@
1
+import lwc from '@lwc/rollup-plugin';
2
+import { test, expect } from 'vitest';
3
+
4
+test('exposes plugin version', () => {
5
+ const plugin = lwc();
6
+ expect(plugin.version).toMatch(/^\d+\.\d+\.\d+/);
7
+});
packages/@lwc/rollup-plugin/src/index.ts
@@ -182,7 +182,8 @@ export default function lwc(pluginOptions: RollupLwcOptions = {}): Plugin {
182
183
return {
184
name: PLUGIN_NAME,
185
-
+ // The version from the package.json is inlined by the build script
186
+ version: process.env.LWC_VERSION,
187
buildStart({ input }) {
188
if (rootDir === undefined) {
189
if (Array.isArray(input)) {
0 commit comments