sleexyz / dir-loader

Dynamically require a directory in Webpack. Use Webpack as a CMS!
13 stars 5 forks source link

Label output nodes directories or files #15

Closed sleexyz closed 9 years ago

sleexyz commented 9 years ago

use a non-enumerable __type__ key

And document this feature!

sleexyz commented 9 years ago

non-enumerable properties don't go through Object.assign

Though Symbols do, they don't go through JSON.stringify.

The next best solution is to use illegal filenames, and then run a replacer function to convert illegal filenames into symbols.

sleexyz commented 9 years ago

Implemented in f938da7cd9baa8cad7440795d0196e7b69356714