Skip to content

Commit 837de1d

Browse files
committed
fix: cross-env & windows fix for vue
This is a contribution to merge #46 in which they fixed the react path but ignored the vue ones, also the cmd command is passed over cross-env package to make sure it works in any enviroment (linux/osx/windows)
1 parent b2ff5be commit 837de1d

File tree

3 files changed

+12911
-4932
lines changed

3 files changed

+12911
-4932
lines changed

bundler.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = function bundle (Components, out, config) {
2525
import Vue from 'vue/dist/vue.js';\n
2626
window.Vue = Vue;\n
2727
28-
import VueWrapper from '${path.relative(absoluteOut, path.join(__dirname, VUE_WRAPPER))}';\n
28+
import VueWrapper from '${pathCrossEnv(path.relative(absoluteOut, path.join(__dirname, VUE_WRAPPER)))}';\n
2929
window.VueWrapper = VueWrapper;\n
3030
`
3131
}
@@ -80,7 +80,7 @@ module.exports = function bundle (Components, out, config) {
8080
fs.writeFileSync(entry, entryFile)
8181
console.log('Bundling components')
8282
const outDist = path.join(out, 'build')
83-
const cmd = `NODE_ENV=development parcel build ${entry} --out-dir ${outDist}`
83+
const cmd = `cross-env NODE_ENV=development parcel build ${entry} --out-dir ${outDist}`
8484
console.log(`running: ${cmd}`)
8585
try {
8686
execSync(cmd)

0 commit comments

Comments
 (0)