Skip to content

Commit

Permalink
chore: update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Oct 6, 2024
1 parent 8d8f3cf commit f21bffd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
check-latest: true
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
Expand Down
7 changes: 3 additions & 4 deletions tools/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@ import { builtinModules } from 'node:module';
import process from 'node:process';

import { rollup, VERSION } from 'rollup';
import type { ExternalOption } from 'rollup';

import dts from 'rollup-plugin-dts';
import { swc, defineRollupSwcOption } from '../src/index';

import pkg from '../package.json';

const deps = Object.keys(pkg.dependencies);
const peerDeps = Object.keys(pkg.peerDependencies);
const externalModules = new Set(Object.keys(pkg.dependencies).concat(Object.keys(pkg.peerDependencies)).concat(builtinModules));
const external: ExternalOption = (id) => id.startsWith('node:') || externalModules.has(id);

async function main() {
const external = [...deps, ...peerDeps, ...builtinModules];

async function build() {
const bundle = await rollup({
input: './src/index.ts',
Expand Down

0 comments on commit f21bffd

Please sign in to comment.