Last active
June 15, 2018 11:48
-
-
Save cjus/7fe2e871931e960be3fe47d2dd7c93dd to your computer and use it in GitHub Desktop.
Preact Webpack Hook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default (config, env, helpers) => { | |
config.target = 'electron-renderer'; | |
if (env.production) { | |
config.output.publicPath = env.pkg.homepage; | |
let {plugin} = helpers.getPluginsByName(config, 'DefinePlugin')[0]; | |
plugin.definitions['PUBLIC_PATH'] = env.pkg.homepage; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment