Skip to content

Commit 526bdcf

Browse files
authored
fix: esModule option should defaults to true (#14)
1 parent b11b4d6 commit 526bdcf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ By default, `@rsbuild/plugin-toml` generates JS modules that use the ES modules
6262

6363
```js
6464
pluginToml({
65-
exModule: false,
65+
esModule: false,
6666
});
6767
```
6868

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const pluginToml = (options: PluginTomlOptions = {}): RsbuildPlugin => ({
1111

1212
async setup(api) {
1313
const { parse } = await import('toml');
14-
const { esModule } = options;
14+
const { esModule = true } = options;
1515

1616
api.transform({ test: /\.toml$/ }, ({ code }) => {
1717
const parsed = parse(code);

0 commit comments

Comments
 (0)