1 | const base = require("./base");
|
2 | const path = require("path");
|
3 | const webpack = require("webpack");
|
4 | const merge = require("webpack-merge");
|
5 | const HtmlWebpackPlugin = require('html-webpack-plugin');
|
6 |
|
7 | const htmlWebpackPlugin = new HtmlWebpackPlugin({
|
8 | inject: true,
|
9 | filename: path.join(__dirname, '../examples/dist/index.html'),
|
10 | template: path.join(__dirname, '../examples/index.html'),
|
11 | meta: {
|
12 | 'viewport': 'width=device-width, initial-scale=1, shrink-to-fit=no',
|
13 | }
|
14 | });
|
15 |
|
16 | module.exports = merge(base, {
|
17 |
|
18 | entry: {
|
19 | main: ["./src/examples"]
|
20 | },
|
21 |
|
22 | output: {
|
23 | path: path.join(__dirname, '../examples/dist'),
|
24 | publicPath: '',
|
25 | filename: '[name].js',
|
26 | chunkFilename: '[name].chunk.js'
|
27 | },
|
28 |
|
29 | resolve: {
|
30 | alias: {
|
31 |
|
32 | }
|
33 | },
|
34 |
|
35 | plugins: [
|
36 | htmlWebpackPlugin,
|
37 | new webpack.HotModuleReplacementPlugin()
|
38 | ],
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 | devServer: {
|
51 | contentBase: path.join(__dirname, '../dist'),
|
52 | hot: true,
|
53 | host: "192.168.199.18",
|
54 | port: 8081,
|
55 | open: true,
|
56 | noInfo: false,
|
57 | disableHostCheck: true,
|
58 |
|
59 | },
|
60 | }); |
\ | No newline at end of file |