Skip to content

Commit

Permalink
fixed windows build issue, changed to platform independent external p…
Browse files Browse the repository at this point in the history
…roperty in rollup config file (#406)
  • Loading branch information
Spiral-Memory committed Jan 18, 2024
1 parent 4176f75 commit 210d164
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion packages/api/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import dts from 'rollup-plugin-dts'
import esbuild from 'rollup-plugin-esbuild'
import packageJson from './package.json' assert { type: 'json' };
import path from 'path';

const name = packageJson.main.replace(/\.js$/, '');

const bundle = config => ({
...config,
input: 'src/index.ts',
external: id => !/^[./]/.test(id),
external: id => {
return id[0] !== '.' && !path.isAbsolute(id);
},
})

export default [
Expand Down
6 changes: 4 additions & 2 deletions packages/auth/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import dts from 'rollup-plugin-dts'
import esbuild from 'rollup-plugin-esbuild'

import path from 'path';
import packageJson from './package.json' assert { type: 'json' };

const name = packageJson.main.replace(/\.js$/, '');

const bundle = config => ({
...config,
input: 'src/index.ts',
external: id => !/^[./]/.test(id),
external: id => {
return id[0] !== '.' && !path.isAbsolute(id);
},
})

export default [
Expand Down

0 comments on commit 210d164

Please sign in to comment.