Skip to content

Commit

Permalink
chore: output the vscode extension bundle as es insteasd of cjs
Browse files Browse the repository at this point in the history
As of vscode 1.87.0  es modules will be supported
microsoft/vscode#130367
  • Loading branch information
lukecotter committed Feb 26, 2024
1 parent 5ed8cff commit 5acbc8f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Changed

- Update VScode minimum supported version to 1.78.0

## [1.14.0] - 2024-02-12

### Added
Expand Down
5 changes: 3 additions & 2 deletions lana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"salesforce"
],
"main": "out/Main.js",
"type": "module",
"icon": "certinia-icon-color.png",
"galleryBanner": {
"color": "#000000",
Expand All @@ -35,7 +36,7 @@
"url": "https://github.com/certinia/debug-log-analyzer.git"
},
"engines": {
"vscode": "^1.74.0"
"vscode": "^1.87.0"
},
"categories": [
"Other"
Expand Down Expand Up @@ -168,7 +169,7 @@
},
"devDependencies": {
"@types/node": "~18.15.13",
"@types/vscode": "~1.74.0",
"@types/vscode": "~1.86.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"typescript": "^5.3.3"
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ export default [
{
input: './lana/src/Main.ts',
output: {
format: 'cjs',
format: 'es',
dir: './lana/out',
chunkFileNames: '[name].js',
sourcemap: false,
},
external: ['vscode'],
plugins: [
nodeResolve({ preferBuiltins: true, dedupe: ['@salesforce/core'] }),
commonjs(),
nodeResolve({ preferBuiltins: true, dedupe: ['@salesforce/core'] }),
json(),
swc(
defineRollupSwcOption({
Expand All @@ -43,6 +43,7 @@ export default [
// swc's minify option here
mangle: true,
compress: true,
module: true,
}),
),
],
Expand All @@ -57,8 +58,9 @@ export default [
},
],
plugins: [
nodeResolve({ browser: true, preferBuiltins: false }),
commonjs(),
nodeResolve({ browser: true, preferBuiltins: false }),

nodePolyfills(),
swc(
defineRollupSwcOption({
Expand Down

0 comments on commit 5acbc8f

Please sign in to comment.