v-page 2.0.9 → 3.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/webpack.config.js DELETED
@@ -1,118 +0,0 @@
1
- var path = require('path')
2
- var webpack = require('webpack')
3
- var isCoverage = process.env.NODE_ENV === 'coverage';
4
- module.exports = {
5
- entry: './src/index.js',
6
- output: {
7
- path: path.resolve(__dirname, './dist'),
8
- publicPath: '/dist/',
9
- filename: 'v-page.js',
10
- library: 'vPage',
11
- libraryTarget: 'umd',
12
- umdNamedDefine: true
13
- },
14
- module: {
15
- rules: [
16
- isCoverage ? {
17
- test: /\.(js|ts)/,
18
- include: path.resolve('src'), // instrument only testing sources with Istanbul, after ts-loader runs
19
- loader: 'istanbul-instrumenter-loader'
20
- } : {},
21
- {
22
- test: /\.css$/,
23
- use: [
24
- 'vue-style-loader',
25
- 'css-loader'
26
- ],
27
- },
28
- {
29
- test: /\.scss$/,
30
- use: [
31
- 'vue-style-loader',
32
- 'css-loader',
33
- 'sass-loader'
34
- ],
35
- },
36
- {
37
- test: /\.sass$/,
38
- use: [
39
- 'vue-style-loader',
40
- 'css-loader',
41
- 'sass-loader?indentedSyntax'
42
- ],
43
- },
44
- {
45
- test: /\.vue$/,
46
- loader: 'vue-loader',
47
- options: {
48
- loaders: {
49
- // Since sass-loader (weirdly) has SCSS as its default parse mode, we map
50
- // the "scss" and "sass" values for the lang attribute to the right configs here.
51
- // other preprocessors should work out of the box, no loader config like this necessary.
52
- 'scss': [
53
- 'vue-style-loader',
54
- 'css-loader',
55
- 'sass-loader'
56
- ],
57
- 'sass': [
58
- 'vue-style-loader',
59
- 'css-loader',
60
- 'sass-loader?indentedSyntax'
61
- ]
62
- }
63
- // other vue-loader options go here
64
- }
65
- },
66
- {
67
- test: /\.js$/,
68
- loader: 'babel-loader',
69
- exclude: /node_modules/
70
- },
71
- {
72
- test: /\.(png|jpg|gif|svg)$/,
73
- loader: 'file-loader',
74
- options: {
75
- name: '[name].[ext]?[hash]'
76
- }
77
- }
78
- ]
79
- },
80
- resolve: {
81
- alias: {
82
- 'vue$': 'vue/dist/vue.esm.js',
83
- '@': path.resolve(__dirname, 'src/'),
84
- '@test': path.resolve(__dirname, 'tests/')
85
- },
86
- extensions: ['*', '.js', '.vue', '.json']
87
- },
88
- devServer: {
89
- historyApiFallback: true,
90
- noInfo: true,
91
- overlay: true
92
- },
93
- performance: {
94
- hints: false
95
- },
96
- devtool: isCoverage?'inline-cheap-module-source-map':'#eval-source-map'
97
- }
98
-
99
- if (process.env.NODE_ENV === 'production') {
100
- module.exports.devtool = '#source-map'
101
- // http://vue-loader.vuejs.org/en/workflow/production.html
102
- module.exports.plugins = (module.exports.plugins || []).concat([
103
- new webpack.DefinePlugin({
104
- 'process.env': {
105
- NODE_ENV: '"production"'
106
- }
107
- }),
108
- new webpack.optimize.UglifyJsPlugin({
109
- sourceMap: true,
110
- compress: {
111
- warnings: false
112
- }
113
- }),
114
- new webpack.LoaderOptionsPlugin({
115
- minimize: true
116
- })
117
- ])
118
- }