Rename to hkt.sh
This commit is contained in:
48
node_modules/chrome-remote-interface/webpack.config.js
generated
vendored
Normal file
48
node_modules/chrome-remote-interface/webpack.config.js
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
'use strict';
|
||||
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const webpack = require('webpack');
|
||||
|
||||
function criWrapper(_, options, callback) {
|
||||
window.criRequest(options, callback); // eslint-disable-line no-undef
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
mode: 'production',
|
||||
resolve: {
|
||||
fallback: {
|
||||
'util': require.resolve('util/'),
|
||||
'url': require.resolve('url/'),
|
||||
'http': false,
|
||||
'https': false,
|
||||
'dns': false
|
||||
},
|
||||
alias: {
|
||||
'ws': './websocket-wrapper.js'
|
||||
}
|
||||
},
|
||||
externals: [
|
||||
{
|
||||
'./external-request.js': `var (${criWrapper})`
|
||||
}
|
||||
],
|
||||
plugins: [
|
||||
new webpack.ProvidePlugin({
|
||||
process: 'process/browser',
|
||||
}),
|
||||
],
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
extractComments: false,
|
||||
})
|
||||
],
|
||||
},
|
||||
entry: ['babel-polyfill', './index.js'],
|
||||
output: {
|
||||
path: __dirname,
|
||||
filename: 'chrome-remote-interface.js',
|
||||
libraryTarget: process.env.TARGET || 'commonjs2',
|
||||
library: 'CDP'
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user