Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for loading and saving js files. #250

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yoneal
Copy link

@yoneal yoneal commented Jan 23, 2017

Javascript files must be in CommonJS module format, solving #96

This is just to start the ball rolling. If it is more appropriate to turn this into a separate plugin instead, just let me know!

Javascript files must be in CommonJS module format.
@indexzero
Copy link
Owner

This is a really neat idea! The world of webpack.config.js and other JavaScript config files has become much larger since this project was written. Evaluating JavaScript even in a new vm context is more dangerous than JSON, so would like to see this be an opt-in feature.

If you have time to make that change and add tests we'll get it landed.

... thanks again!

@mhamann mhamann added this to the v1.1.0 milestone Oct 28, 2017
lineOffset: 0,
displayErrors: true
});
console.log(util.inspect(context));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably you should remove console.log

@dlong500
Copy link

Any movement on this? It would be really nice to have the same type of flexibility as other config file systems. I get the theoretical argument that JS is more dangerous than JSON. However, given the context of numerous build tools and other modules high adoption rate of JS config files it seems like the security issue is a bit overstated. And besides, if someone can hack one of your config files they can likely hack any file in your entire app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants