Skip to content

Commit

Permalink
add webpack + vue for test
Browse files Browse the repository at this point in the history
  • Loading branch information
Maiz committed Jul 4, 2019
1 parent 3377ae8 commit 874d6d8
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/webpack/index.dist.js

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions test/webpack/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, viewport-fit=cover">
<title>Test: Log</title>
<link href="../../example/lib/weui.min.css" rel="stylesheet"/>
<link href="../../example/lib/demo.css" rel="stylesheet"/>

<script src="../../example/lib/zepto.min.js"></script>
<script src="../../example/lib/zepto.touch.min.js"></script>

</head>
<body ontouchstart>
<div id="app">
{{ msg }}
</div>
<script src="./index.dist.js"></script>
</body>
</html>
16 changes: 16 additions & 0 deletions test/webpack/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Vue from './vue.min.js'
import VConsole from '../../dist/vconsole.min.js';

new Vue({
el: '#app',
data() {
return {
msg: 'Hello vConsole for test.'
};
},
mounted() {
new VConsole();
console.log('Hello vConsole for test.');
}
});

6 changes: 6 additions & 0 deletions test/webpack/vue.min.js

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions test/webpack/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
var Path = require('path');
var Webpack = require('webpack');

module.exports = {
mode: 'production',
// devtool: false,
entry: {
index : Path.resolve(__dirname, './index.js')
},
output: {
path: Path.resolve(__dirname, './'),
filename: '[name].dist.js',
},
module: {
rules: [
]
},
stats: {
colors: true,
},
plugins: [
new Webpack.SourceMapDevToolPlugin()
]
};

0 comments on commit 874d6d8

Please sign in to comment.