Skip to content

Commit

Permalink
fix: cross-env & windows fix for vue
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
vis97c committed Jul 25, 2020
1 parent b2ff5be commit 837de1d
Show file tree
Hide file tree
Showing 3 changed files with 12,911 additions and 4,932 deletions.
4 changes: 2 additions & 2 deletions bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = function bundle (Components, out, config) {
import Vue from 'vue/dist/vue.js';\n
window.Vue = Vue;\n
import VueWrapper from '${path.relative(absoluteOut, path.join(__dirname, VUE_WRAPPER))}';\n
import VueWrapper from '${pathCrossEnv(path.relative(absoluteOut, path.join(__dirname, VUE_WRAPPER)))}';\n
window.VueWrapper = VueWrapper;\n
`
}
Expand Down Expand Up @@ -80,7 +80,7 @@ module.exports = function bundle (Components, out, config) {
fs.writeFileSync(entry, entryFile)
console.log('Bundling components')
const outDist = path.join(out, 'build')
const cmd = `NODE_ENV=development parcel build ${entry} --out-dir ${outDist}`
const cmd = `cross-env NODE_ENV=development parcel build ${entry} --out-dir ${outDist}`
console.log(`running: ${cmd}`)
try {
execSync(cmd)
Expand Down
Loading

0 comments on commit 837de1d

Please sign in to comment.