Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apply(compiler) {
- this.config.servicePath = compiler.context;
- compiler.plugin('emit', (compilation, cb) => {
- this.service.load()
- .then((slsFileObjects) => {
- const parsedSlsYml = this.variables.populateService(slsFileObjects);
- const serviceConfig = _.get(parsedSlsYml, 'custom.serviceConfig');
- const props = { 'process.env.SERVICE_CONFIG': serviceConfig ? JSON.stringify(serviceConfig) : undefined };
- compiler.apply(new webpack.DefinePlugin(props));
- cb();
- });
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement