Skip to content

Commit 8d34d10

Browse files
committed
bugfix(demo):fix demo build webpack config jodit#293
1 parent 94c0ccc commit 8d34d10

File tree

4 files changed

+366
-6
lines changed

4 files changed

+366
-6
lines changed

examples/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,4 @@ <h3>JavaScript</h3>
6262
</body>
6363
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,400,400i,700,700i" rel="stylesheet">
6464

65-
<script src="build/app.js"></script>
6665
</html>

examples/webpack.config.ts renamed to examples/webpack.config.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import path from 'node:path';
2-
import process from 'node:process';
3-
4-
export default {
1+
const path = require('node:path');
2+
const process = require('node:process');
3+
const HtmlWebpackPlugin = require('html-webpack-plugin');
4+
const config = {
55
entry: './app.tsx',
66
context: path.join(process.cwd(), './examples/'),
77
devtool: 'eval',
@@ -24,6 +24,10 @@ export default {
2424
extensions: ['.js', '.jsx', '.ts', '.tsx']
2525
},
2626

27+
plugins: [
28+
new HtmlWebpackPlugin({ template: 'index.html' })
29+
],
30+
2731
output: {
2832
path: path.join(process.cwd(), './examples/build/'),
2933
filename: 'app.js'
@@ -41,3 +45,4 @@ export default {
4145
hot: true
4246
}
4347
};
48+
module.exports = config;

0 commit comments

Comments
 (0)