Skip to content

Commit

Permalink
Pass compiler version in dev events
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothy Johnson authored and Conduitry committed Jan 5, 2020
1 parent 33aab87 commit 646c3df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ export default [
],
external,
plugins: [
replace({
__VERSION__: pkg.version
}),
ts_plugin,
{
writeBundle(bundle) {
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/internal/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { custom_event, append, insert, detach, listen, attr } from './dom';
import { SvelteComponent } from './Component';

export function dispatch_dev<T=any>(type: string, detail?: T) {
document.dispatchEvent(custom_event(type, detail));
document.dispatchEvent(custom_event(type, { version: '__VERSION__', ...detail }));
}

export function append_dev(target: Node, node: Node) {
Expand Down

0 comments on commit 646c3df

Please sign in to comment.