diff --git a/package-lock.json b/package-lock.json index bdc5b69..6ee171f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "rollup-extras", + "name": "rollup-extras-copy", "lockfileVersion": 2, "requires": true, "packages": { @@ -11210,7 +11210,7 @@ }, "plugin-copy": { "name": "@rollup-extras/plugin-copy", - "version": "1.0.0", + "version": "1.0.1", "license": "MIT", "dependencies": { "@niceties/logger": "^1.0.4", diff --git a/plugin-html/src/index.ts b/plugin-html/src/index.ts index b8c92ac..1f0c364 100644 --- a/plugin-html/src/index.ts +++ b/plugin-html/src/index.ts @@ -134,7 +134,7 @@ export default function(options: HtmlPluginOptions = {}) { } async function buildStart(this: PluginContext) { - this.addWatchFile('src/index.html'); + this.addWatchFile(template as string); } function renderStart() { diff --git a/plugin-html/tests/index.spec.ts b/plugin-html/tests/index.spec.ts index 1e14941..cfb62b4 100644 --- a/plugin-html/tests/index.spec.ts +++ b/plugin-html/tests/index.spec.ts @@ -662,6 +662,7 @@ describe('@rollup-extras/plugin-html', () => { } }]); + expect(rollupContextMock.addWatchFile).toBeCalledWith('index.html'); expect(rollupContextMock.emitFile).toBeCalledWith(expect.objectContaining({ fileName: 'index.html', source: 'File Template',