Skip to content

Commit

Permalink
fix: 修改taro增加主题编译 (#950)
Browse files Browse the repository at this point in the history
  • Loading branch information
junjun666 authored Apr 26, 2023
1 parent e95f288 commit 9ea6d82
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sites/mobile-taro/config/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
const path = require('path')

let fileStr = `styles/variables.scss`
let themeStr = `styles/theme-default.scss`
const projectID = process.env.VITE_APP_PROJECT_ID
if (projectID) {
fileStr = `styles/variables-${projectID}.scss`
themeStr = `styles/theme-${projectID}.scss`
}

const config = {
Expand All @@ -30,7 +32,10 @@ const config = {
'@': path.resolve(__dirname, '../../../../src'),
},
sass: {
resource: path.resolve(__dirname, '../../../', fileStr),
resource: [
path.resolve(__dirname, '../../../', fileStr),
path.resolve(__dirname, '../../../', themeStr),
],
},
defineConstants: {},
copy: {
Expand Down

0 comments on commit 9ea6d82

Please sign in to comment.