alloc / cush

WIP module bundler 🎁
MIT License
0 stars 0 forks source link

js: support string modules by default #25

Open aleclarson opened 5 years ago

aleclarson commented 5 years ago

Importing an asset that has no dedicated plugin should be transformed into a string that is exported by its module.

A simple example with a JSON module:

// main.js
require('./data.json')

// data.json
{"hello": "world"}

transforms to:

// data.json
module.exports = '{"hello": "world"}'

No sourcemap is generated.