mirror of
https://github.com/fluencelabs/lazy-snark
synced 2025-06-12 06:21:26 +00:00
Added initial frontend
This commit is contained in:
35
frontend/webpack.config.js
Normal file
35
frontend/webpack.config.js
Normal file
@ -0,0 +1,35 @@
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
// use index.js as entrypoint
|
||||
entry: {
|
||||
app: ['./index.js']
|
||||
},
|
||||
devServer: {
|
||||
contentBase: './bundle',
|
||||
hot: true
|
||||
},
|
||||
mode: "development",
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ['style-loader', 'css-loader']
|
||||
}
|
||||
]
|
||||
},
|
||||
// build all code in `bundle.js` in `bundle` directory
|
||||
output: {
|
||||
filename: 'bundle.js',
|
||||
path: path.resolve(__dirname, 'bundle')
|
||||
},
|
||||
plugins: [
|
||||
// create `index.html` with imported `bundle.js`
|
||||
new CopyWebpackPlugin([{
|
||||
from: './*.html'
|
||||
}]),
|
||||
new webpack.HotModuleReplacementPlugin()
|
||||
]
|
||||
};
|
Reference in New Issue
Block a user