Implemented cryptomining, although its extremely bad optimized.
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
const path = require('path')
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
index: path.resolve(__dirname, '../src/js/index.js')
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../dist'),
|
||||
filename: '[name].js',
|
||||
clean: true
|
||||
},
|
||||
context: path.resolve(__dirname, '../src'),
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
template: path.resolve(__dirname, '../src/index.html'),
|
||||
filename: 'index.html',
|
||||
favicon: path.resolve(__dirname, '../src/favicon.svg')
|
||||
})
|
||||
],
|
||||
resolve: {
|
||||
fallback: {
|
||||
fs: false,
|
||||
crypto: false
|
||||
}
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.html$/,
|
||||
loader: 'html-loader'
|
||||
},
|
||||
{
|
||||
test: /\.wasm$/,
|
||||
type: 'javascript/auto',
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
outputPath: 'wasm/',
|
||||
publicPath: 'wasm/'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
const path = require('path')
|
||||
const { merge } = require('webpack-merge')
|
||||
const common = require('./webpack.config.common.js')
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'development',
|
||||
devtool: 'eval-cheap-module-source-map',
|
||||
devServer: {
|
||||
static: path.join(__dirname, '../dist'),
|
||||
port: 9999,
|
||||
devMiddleware: {
|
||||
index: true,
|
||||
writeToDisk: true
|
||||
},
|
||||
client: {
|
||||
logging: 'error'
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
const { merge } = require('webpack-merge')
|
||||
const common = require('./webpack.config.common.js')
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'production'
|
||||
})
|
||||
Reference in New Issue
Block a user