Skip to content

Commit

Permalink
Aug 4, 2024, 12:42 PM
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Aug 4, 2024
1 parent 6e329d8 commit 8e2a9c9
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ import json from '@rollup/plugin-json';
import dts from 'rollup-plugin-dts';
import { nodeResolve } from '@rollup/plugin-node-resolve';

function addJsExtension() {
return {
name: 'add-js-extension',
resolveId(source, importer) {
if (source.startsWith('@acala-network/sdk/')) {
return {
id: source + '.js',
external: true
};
}
return null;
}
};
}

export default [
{
input: './src/index.ts', // Your main TypeScript file
Expand All @@ -20,9 +35,10 @@ export default [
presets: ['@babel/preset-env'],
extensions: ['.js', '.ts'],
}),
// nodeResolve({
// extensions: ['.js', '.ts'] // Add any other extensions you're using
// }),
nodeResolve({
extensions: ['.js', '.ts'],
preferBuiltins: true
}),
],
},
{
Expand Down

0 comments on commit 8e2a9c9

Please sign in to comment.