Skip to content

Commit

Permalink
fix(rollup): fix ts plugin warnings when choosing transform
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieMason committed Feb 27, 2022
1 parent 1f94203 commit 93f8330
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/rollup-watcher.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import path from 'path';
import * as rollup from 'rollup';
import tsPlugin from 'rollup-plugin-typescript2';
import { createFileWatcher } from './file-watcher';
Expand All @@ -11,6 +12,7 @@ const getBundledSource = async (filePath: string) => {
},
plugins: [
tsPlugin({
cwd: path.dirname(filePath),
tsconfigOverride: {
compilerOptions: {
module: 'ESNext',
Expand All @@ -21,6 +23,10 @@ const getBundledSource = async (filePath: string) => {
});
const build: rollup.RollupOutput = await bundle.generate({
format: 'esm',
globals: {
ts: 'typescript',
typescript: 'typescript',
},
});
build.output.forEach((chunkOrAsset) => {
if ('code' in chunkOrAsset && chunkOrAsset.code) {
Expand Down

0 comments on commit 93f8330

Please sign in to comment.