-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: improve tree shaking * build: generate es2015 code * build: use `defineConfig` * chore: versions * chore: revert potentially unsafe treeshake rules * chore: update `@rollup/plugin-commonjs`
- Loading branch information
Showing
15 changed files
with
215 additions
and
236 deletions.
There are no files selected for viewing
Binary file removed
BIN
-86.6 KB
.yarn/cache/@rollup-plugin-commonjs-npm-18.0.0-6e9288de62-1e8d2589ab.zip
Binary file not shown.
Binary file added
BIN
+89.7 KB
.yarn/cache/@rollup-plugin-commonjs-npm-21.0.1-a250ff7740-3e56be58c7.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,36 @@ | ||
releases: | ||
"@yarnpkg/cli": patch | ||
"@yarnpkg/core": patch | ||
"@yarnpkg/plugin-pnp": patch | ||
"@yarnpkg/pnp": patch | ||
vscode-zipfs: patch | ||
|
||
declined: | ||
- "@yarnpkg/esbuild-plugin-pnp" | ||
- "@yarnpkg/plugin-compat" | ||
- "@yarnpkg/plugin-constraints" | ||
- "@yarnpkg/plugin-dlx" | ||
- "@yarnpkg/plugin-essentials" | ||
- "@yarnpkg/plugin-exec" | ||
- "@yarnpkg/plugin-file" | ||
- "@yarnpkg/plugin-git" | ||
- "@yarnpkg/plugin-github" | ||
- "@yarnpkg/plugin-http" | ||
- "@yarnpkg/plugin-init" | ||
- "@yarnpkg/plugin-interactive-tools" | ||
- "@yarnpkg/plugin-link" | ||
- "@yarnpkg/plugin-nm" | ||
- "@yarnpkg/plugin-npm" | ||
- "@yarnpkg/plugin-npm-cli" | ||
- "@yarnpkg/plugin-pack" | ||
- "@yarnpkg/plugin-patch" | ||
- "@yarnpkg/plugin-pnpm" | ||
- "@yarnpkg/plugin-stage" | ||
- "@yarnpkg/plugin-typescript" | ||
- "@yarnpkg/plugin-version" | ||
- "@yarnpkg/plugin-workspace-tools" | ||
- "@yarnpkg/builder" | ||
- "@yarnpkg/doctor" | ||
- "@yarnpkg/nm" | ||
- "@yarnpkg/pnpify" | ||
- "@yarnpkg/sdks" |
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 |
---|---|---|
@@ -1,27 +1,38 @@ | ||
import cjs from '@rollup/plugin-commonjs'; | ||
import resolve from '@rollup/plugin-node-resolve'; | ||
import path from 'path'; | ||
import esbuild from 'rollup-plugin-esbuild'; | ||
import cjs from '@rollup/plugin-commonjs'; | ||
import resolve from '@rollup/plugin-node-resolve'; | ||
import path from 'path'; | ||
import esbuild from 'rollup-plugin-esbuild'; | ||
import {defineConfig} from 'rollup'; | ||
|
||
const mode = process.env.NODE_ENV || `production`; | ||
|
||
// eslint-disable-next-line arca/no-default-export | ||
export default async () => ({ | ||
input: `./sources/index.ts`, | ||
output: { | ||
file: `./build/index.js`, | ||
format: `cjs`, | ||
}, | ||
plugins: [ | ||
resolve({ | ||
extensions: [`.mjs`, `.js`, `.ts`, `.tsx`, `.json`], | ||
rootDir: path.join(__dirname, `../../`), | ||
jail: path.join(__dirname, `../../`), | ||
preferBuiltins: true, | ||
}), | ||
esbuild({tsconfig: false, target: `node12`}), | ||
cjs({transformMixedEsModules: true, extensions: [`.js`, `.ts`]}), | ||
mode === `production` && (await import(`rollup-plugin-terser`)).terser({ecma: 2019}), | ||
], | ||
external: [`vscode`], | ||
}); | ||
export default async () => | ||
defineConfig({ | ||
input: `./sources/index.ts`, | ||
output: { | ||
file: `./build/index.js`, | ||
format: `cjs`, | ||
generatedCode: `es2015`, | ||
}, | ||
plugins: [ | ||
resolve({ | ||
extensions: [`.mjs`, `.js`, `.ts`, `.tsx`, `.json`], | ||
rootDir: path.join(__dirname, `../../`), | ||
jail: path.join(__dirname, `../../`), | ||
preferBuiltins: true, | ||
}), | ||
esbuild({ | ||
tsconfig: false, | ||
target: `node12`, | ||
define: { | ||
document: `undefined`, | ||
XMLHttpRequest: `undefined`, | ||
crypto: `undefined`, | ||
}, | ||
}), | ||
cjs({transformMixedEsModules: true, extensions: [`.js`, `.ts`]}), | ||
mode === `production` && (await import(`rollup-plugin-terser`)).terser({ecma: 2019}), | ||
], | ||
external: [`vscode`], | ||
}); |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.