-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: parse extension jsons using vscode method
- Loading branch information
Loïc Mangeonjean
committed
Apr 22, 2023
1 parent
c2d9714
commit 1bd5327
Showing
3 changed files
with
57 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import nodeResolve from '@rollup/plugin-node-resolve' | ||
import * as rollup from 'rollup' | ||
import typescript from '@rollup/plugin-typescript' | ||
import * as path from 'path' | ||
import { fileURLToPath } from 'url' | ||
|
||
const __dirname = path.dirname(fileURLToPath(import.meta.url)) | ||
const EXTENSIONS = ['', '.ts', '.js'] | ||
const BASE_DIR = path.resolve(__dirname, '..') | ||
const TSCONFIG = path.resolve(BASE_DIR, 'tsconfig.json') | ||
|
||
const config: rollup.RollupOptions = { | ||
cache: false, | ||
treeshake: { | ||
preset: 'smallest' | ||
}, | ||
external: ['@rollup/pluginutils', 'path', 'yauzl'], | ||
output: [{ | ||
format: 'esm', | ||
dir: 'dist', | ||
entryFileNames: '[name].js' | ||
}], | ||
input: 'src/rollup-vsix-plugin.ts', | ||
plugins: [ | ||
nodeResolve({ | ||
extensions: EXTENSIONS | ||
}), | ||
typescript({ | ||
noEmitOnError: true, | ||
tsconfig: TSCONFIG | ||
}) | ||
] | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters