Skip to content

Commit 49edc1e

Browse files
committed
revert build script
1 parent 45646f1 commit 49edc1e

File tree

2 files changed

+30
-10
lines changed

2 files changed

+30
-10
lines changed

build/build.js

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,46 @@ var main = fs
1919
.replace(/Vue\.version = '[\d\.]+'/, "Vue.version = '" + version + "'")
2020
fs.writeFileSync('src/index.js', main)
2121

22-
// Dev build
22+
// CommonJS build.
23+
// this is used as the "main" field in package.json
24+
// and used by bundlers like Webpack and Browserify.
2325
rollup.rollup({
2426
entry: 'src/index.js',
2527
plugins: [
26-
replace({
27-
'process.env.NODE_ENV': "'development'"
28-
}),
2928
babel({
3029
loose: 'all'
3130
})
3231
]
3332
})
3433
.then(function (bundle) {
35-
return write('dist/vue.js', bundle.generate({
36-
format: 'umd',
37-
banner: banner,
38-
moduleName: 'Vue'
34+
return write('dist/vue.common.js', bundle.generate({
35+
format: 'cjs',
36+
banner: banner
3937
}).code)
4038
})
39+
// Standalone Dev Build
4140
.then(function () {
42-
// Production build
41+
return rollup.rollup({
42+
entry: 'src/index.js',
43+
plugins: [
44+
replace({
45+
'process.env.NODE_ENV': "'development'"
46+
}),
47+
babel({
48+
loose: 'all'
49+
})
50+
]
51+
})
52+
.then(function (bundle) {
53+
return write('dist/vue.js', bundle.generate({
54+
format: 'umd',
55+
banner: banner,
56+
moduleName: 'Vue'
57+
}).code)
58+
})
59+
})
60+
.then(function () {
61+
// Standalone Production Build
4362
return rollup.rollup({
4463
entry: 'src/index.js',
4564
plugins: [

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
"browser",
1010
"framework"
1111
],
12-
"main": "dist/vue.js",
12+
"main": "dist/vue.common.js",
1313
"files": [
1414
"dist/vue.js",
1515
"dist/vue.min.js",
16+
"dist/vue.common.js",
1617
"src"
1718
],
1819
"repository": {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy