Created
January 21, 2018 03:34
-
-
Save pavelvlasov/810cd1d2128abccd3fa3f0f97c5d54b7 to your computer and use it in GitHub Desktop.
html-to-png webpack config
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
import * as CopyWebpackPlugin from "copy-webpack-plugin"; | |
import * as path from "path"; | |
import * as PermissionsOutputPlugin from "webpack-permissions-plugin"; | |
import getBaseConfig from "../../webpack.dev"; | |
const baseConfig = getBaseConfig(__dirname); | |
module.exports = Object.assign( | |
{ | |
plugins: [ | |
new CopyWebpackPlugin([ | |
{ | |
from: "phantomjs/phantomjs_linux-x86_64", | |
to: "phantomjs" | |
}, | |
{ | |
from: "phantomjs/screenshot.js", | |
to: "phantomjs" | |
} | |
]), | |
new PermissionsOutputPlugin({ | |
buildFiles: [ | |
path.join( | |
baseConfig.output.path, | |
"service", | |
"phantomjs", | |
"phantomjs_linux-x86_64" | |
) | |
] | |
}) | |
] | |
}, | |
baseConfig | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment