Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
webpack: function(config, { isServer }) {
if (isServer) return config;
config.plugins.push(
new GuessPlugin({
debug: true,
reportProvider() {
return Promise.resolve(JSON.parse(require('fs').readFileSync('./routes.json')));
},
runtime: {
delegate: true
}
})
);
return config;
}
};
this.extendBuild((config, ctx) => {
if (!ctx.isDev && ctx.isClient) {
config.plugins.push(new GuessPlugin(options))
}
})
}