Skip to content

Commit 34e9fd3

Browse files
committed
chore: temp commit
1 parent 29c19ea commit 34e9fd3

File tree

9 files changed

+201
-180
lines changed

9 files changed

+201
-180
lines changed

build/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const baseConfig = {
1616
noExternal: ['estree-walker'],
1717
format: ['cjs', 'esm'],
1818
clean: true,
19-
minify: true,
19+
minify: false,
2020
dts: false,
2121
outDir: path.resolve(process.cwd(), '../dist'),
2222

packages/core/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ const unplugin = createUnplugin<Options>(
7878
try {
7979
// transform in dev
8080
if (isServer) {
81+
console.log(code)
8182
if (id.endsWith('.vue')) {
8283
const injectRes = injectCSSVars(code, vbindVariableList.get(id), isScriptSetup)
8384
code = injectRes.code

packages/core/runtime.md

-7
This file was deleted.

packages/core/runtime/process-css.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export function handleAlias(path: string, alias?: Record<string, string>, idDirP
9494
}
9595
}
9696

97-
if (importerPath) return importerPath
97+
if (importerPath) return transformSymbol(importerPath)
9898
importerPath = idDirPath ? resolve(idDirPath, path) : path
9999
} else {
100100
idDirPath && (importerPath = resolve(idDirPath, path))

play/src/assets/css/foo.css

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
#foo div {
2-
color: v-bind(fooColorCSS);
1+
#foo{
2+
color: v-bind-m(color);
3+
background: #94c9ff;
4+
width: 200px;
5+
height: 30px;
36
}

play/src/comp.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
import { reactive, ref } from 'vue'
33
const compAsd = () => 'red'
4-
const color = 'yellow'
4+
const color = 'red'
55
const compTheme1 = compAsd()
66
const compTheme2 = 'red'
77
const sassColor = 'pink'

play/src/views/app/App.vue

+4-55
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
import { reactive, ref } from 'vue'
33
import Comp from '../../comp.vue'
4-
const color = 'green'
4+
const color = 'grren'
55
const appAsd = () => 'red'
66
const fooColor = appAsd()
77
const appTheme2 = 'blue'
@@ -72,63 +72,12 @@ export default defineComponent({
7272
</script> -->
7373

7474
<template>
75-
<div class="scss" @click="sassColor = 'red'">
75+
<div id="foo" class="scss" @click="sassColor = 'red'">
7676
app
77-
<Comp />
77+
<!-- <Comp /> -->
7878
</div>
7979
</template>
8080

8181
<style lang="scss" scoped>
82-
@import '@/assets/scss/mixin';
83-
@import '../../assets/scss/variables.module';
84-
/* foo.scss -> test2.css -> test.css */
85-
/* foo.scss -> test.scss -> test2.css */
86-
87-
/*@import "./assets/less/less-foo";*/
88-
/*div {
89-
color: v-bind(color)
90-
}
91-
@import './assets/scss/foo.scss';*/
92-
.app-wrapper {
93-
@include clearfix;
94-
position: relative;
95-
height: 100%;
96-
width: 100%;
97-
98-
&.mobile.openSidebar {
99-
position: fixed;
100-
top: 0;
101-
}
102-
}
103-
104-
.drawer-bg {
105-
background: #000;
106-
opacity: 0.3;
107-
width: 100%;
108-
top: 0;
109-
height: 100%;
110-
position: absolute;
111-
z-index: 999;
112-
}
113-
114-
.fixed-header {
115-
position: fixed;
116-
top: 0;
117-
right: 0;
118-
z-index: 9;
119-
width: calc(100% - #{$base-sidebar-width});
120-
transition: width 0.28s;
121-
}
122-
123-
.hideSidebar .fixed-header {
124-
width: calc(100% - 54px);
125-
}
126-
127-
.sidebarHide .fixed-header {
128-
width: 100%;
129-
}
130-
131-
.mobile .fixed-header {
132-
width: 100%;
133-
}
82+
@import '@/assets/css/foo.css';
13483
</style>

play/vite.config.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ export default defineConfig({
3434
vue(),
3535
viteVueCSSVars({
3636
include: [/.vue/],
37-
includeCompile: ['**/**.scss'],
37+
includeCompile: ['**/**.scss', '**/**.css'],
3838
alias: {
3939
'@': resolve(__dirname, './src'),
4040
},
41+
server: true,
4142
}),
4243
],
4344
})

0 commit comments

Comments
 (0)