Skip to content

Instantly share code, notes, and snippets.

@pavelvlasov
Created January 21, 2018 03:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pavelvlasov/810cd1d2128abccd3fa3f0f97c5d54b7 to your computer and use it in GitHub Desktop.
Save pavelvlasov/810cd1d2128abccd3fa3f0f97c5d54b7 to your computer and use it in GitHub Desktop.
html-to-png webpack config
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