0

For a project im working on I need to convert .NET resource files (.resx) to json files so i can use them within an angular 2 app for translations.

Im thinking of writing a webpack (2) loader for this.

my resx loader gives back a string containing JSON:

module.exports = function(content) {
    return convertToJson(content);
};

configuration:

{
   test: [/\.resx$/], 
   loader: 'my-resx-loader'
}

How can i tell webpack to save the output as a json file in the dist/assets folder? where do i place this logics?

1 Answer 1

0

You can try a npm package. I'ts "resx webpack loader" :)

https://www.npmjs.com/package/resx-webpack-loader

Not the answer you're looking for? Browse other questions tagged or ask your own question.