-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(example): update example and docs
- Loading branch information
Showing
5 changed files
with
247 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
const express = require('express'); | ||
const webpack = require('webpack'); | ||
const webpackDevMiddleware = require('webpack-dev-middleware'); | ||
|
||
const app = express(); | ||
const [config1, config2] = require('./webpack.config'); | ||
|
||
const compiler1 = webpack(config1); | ||
const compiler2 = webpack(config2); | ||
|
||
app.use( | ||
webpackDevMiddleware(compiler1, { | ||
publicPath: config1.output.publicPath, | ||
}) | ||
); | ||
|
||
app.use( | ||
webpackDevMiddleware(compiler2, { | ||
publicPath: `${config2.output.publicPath}worker/`, | ||
}) | ||
); | ||
|
||
app.listen(3003, () => { | ||
console.log('App3 listening on port 3003!\n'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.