@@ -10,8 +10,8 @@ const HtmlWebpackPlugin = require('html-webpack-plugin')
10
10
const MiniCssExtractPlugin = require ( 'mini-css-extract-plugin' )
11
11
const OptimizeCSSPlugin = require ( 'optimize-css-assets-webpack-plugin' )
12
12
13
- const isDist = ! ! process . env . DIST_ENV
14
- const distPath = '../dist '
13
+ const isExampleEnv = process . env . EXAMPLE_ENV
14
+ const distPath = '../lib '
15
15
16
16
const env = process . env . NODE_ENV === 'testing'
17
17
? require ( '../config/test.env' )
@@ -36,18 +36,10 @@ const webpackConfig = merge(baseWebpackConfig, {
36
36
new webpack . DefinePlugin ( {
37
37
'process.env' : env
38
38
} ) ,
39
- new CopyWebpackPlugin ( {
40
- patterns : [
41
- {
42
- from : path . resolve ( __dirname , '../README.md' ) ,
43
- to : isDist ? path . resolve ( __dirname , distPath ) : config . build . assetsRoot
44
- }
45
- ] ,
46
- } ) ,
47
39
]
48
40
} )
49
41
50
- if ( isDist ) {
42
+ if ( ! isExampleEnv ) {
51
43
webpackConfig . entry = {
52
44
'vue-json-pretty' : './src/index.js'
53
45
}
@@ -70,14 +62,6 @@ if (isDist) {
70
62
safe : true
71
63
}
72
64
} ) ,
73
- new CopyWebpackPlugin ( {
74
- patterns : [
75
- {
76
- from : path . resolve ( __dirname , '../package.json' ) ,
77
- to : path . resolve ( __dirname , distPath )
78
- }
79
- ] ,
80
- } ) ,
81
65
)
82
66
} else {
83
67
webpackConfig . optimization = {
0 commit comments