Skip to content

Commit

Permalink
fix: vue templates compilation
Browse files Browse the repository at this point in the history
Taslonic bundle was requiring the wrong Vue build at runtime.
Fixed this on Webpack config.
  • Loading branch information
rafaelcamargo committed Jan 22, 2021
1 parent 9e314c9 commit f26cc2e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -9,12 +9,13 @@
],
"scripts": {
"build": "webpack",
"build:clear": "rm -rf ./dist && rm -f ./react.js ./vue-plugin.js ./taslonic.css",
"format": "eslint './src/**/*.js'",
"start": "npm run docs -- --watch --port=5000",
"docs": "pitsby build",
"test": "jest",
"deploy": "firebase deploy --non-interactive",
"prepublishOnly": "rm -rf ./dist && NODE_ENV=production npm run build && bash ./pre-publish.sh"
"prepublishOnly": "bash ./pre-publish.sh"
},
"repository": {
"type": "git",
Expand Down
2 changes: 2 additions & 0 deletions pre-publish.sh
@@ -1,5 +1,7 @@
#!/bin/sh

npm run build:clear
NODE_ENV=production npm run build
cp ./dist/react.js ./react.js
cp ./dist/vue-plugin.js ./vue-plugin.js
cp ./dist/taslonic.css ./taslonic.css
12 changes: 4 additions & 8 deletions webpack.conf.base.js
Expand Up @@ -8,9 +8,9 @@ function getBaseConfig() {
return {
externals: {
'@vue': {
commonjs: 'vue',
commonjs2: 'vue',
amd: 'vue',
commonjs: 'vue/dist/vue.esm',
commonjs2: 'vue/dist/vue.esm',
amd: 'vue/dist/vue.esm',
root: 'Vue'
},
'react': {
Expand Down Expand Up @@ -69,11 +69,7 @@ function getBaseConfig() {
function buildConfig(type){
const base = getBaseConfig();
const { entry, output } = project.scripts.source.libs[type];
return {
...base,
entry,
output
}
return { ...base, entry, output };
}

module.exports = [
Expand Down

0 comments on commit f26cc2e

Please sign in to comment.