Skip to content

Commit

Permalink
chore: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Feb 13, 2024
1 parent 476300b commit ea04d5c
Show file tree
Hide file tree
Showing 3 changed files with 208 additions and 16 deletions.
3 changes: 2 additions & 1 deletion compiler/wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
"unzipit": "^1.4.3",
"url": "^0.11.3",
"webpack": "^5.90.1",
"webpack-cli": "^5.1.4"
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.0"
},
"dependencies": {
"@noir-lang/types": "workspace:*",
Expand Down
10 changes: 6 additions & 4 deletions compiler/wasm/webpack.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { resolve, join } from 'path';
import webpack from 'webpack';
import 'webpack-dev-server';
import type { Configuration as DevServerConfiguration } from 'webpack-dev-server';
import WasmPackPlugin from '@wasm-tool/wasm-pack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import CopyWebpackPlugin from 'copy-webpack-plugin';
Expand All @@ -25,6 +25,10 @@ const config: webpack.Configuration = {
},
};

const devServerConfig: DevServerConfiguration = {
static: join(__dirname, 'dist'),
};

const webConfig: webpack.Configuration = {
name: 'web',
entry: './src/index.mts',
Expand Down Expand Up @@ -74,9 +78,7 @@ const webConfig: webpack.Configuration = {
},
],
},
devServer: {
static: join(__dirname, 'dist'),
},
devServer: devServerConfig,
resolve: {
...config.resolve,
alias: {
Expand Down
Loading

0 comments on commit ea04d5c

Please sign in to comment.