https://github.com/launchcodedev/toml-loader
Webpack loader for TOML files
https://github.com/launchcodedev/toml-loader
Last synced: 8 months ago
JSON representation
Webpack loader for TOML files
- Host: GitHub
- URL: https://github.com/launchcodedev/toml-loader
- Owner: launchcodedev
- License: mpl-2.0
- Created: 2019-05-23T18:25:27.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T05:47:46.000Z (almost 3 years ago)
- Last Synced: 2025-04-03T06:12:39.726Z (9 months ago)
- Language: TypeScript
- Size: 1.65 MB
- Stars: 12
- Watchers: 2
- Forks: 3
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
## TOML Loader
[](https://www.mozilla.org/en-US/MPL/2.0/)
[](https://github.com/launchcodedev/toml-loader/actions)
[](https://www.npmjs.com/package/@lcdev/toml-loader)
Webpack loader for TOML files. Supports the latest TOML spec, and provides named exports.
```
yarn add @lcdev/toml-loader@1
# or for npm
npm i @lcdev/toml-loader@1
```
```javascript
// in your loaders:
module: {
rules: [
{
test: /\.toml$/,
use: { loader: '@lcdev/toml-loader' },
},
],
},
```
### Usage
Supports default export with all file contents, and named exports.
```typescript
import contents from './my-file.toml';
import { namedExport } from './my-other-file.toml';
```
### Alternatives
- [toml-loader](https://www.npmjs.com/package/toml-loader)