create-lve 0.4.25 → 0.4.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config.js +6 -2
- package/package.json +1 -1
- package/template-react/_gitignore +0 -2
- package/template-vue/_gitignore +0 -2
package/config.js
CHANGED
|
@@ -119,9 +119,13 @@ export default defineConfig({
|
|
|
119
119
|
pluginCode: 'tailwindcss(), ',
|
|
120
120
|
entryImport: "import './style.css'\n",
|
|
121
121
|
async setup(ctx) {
|
|
122
|
+
// 模板自带 style.css(含 @import 'tailwindcss' + base UX),不覆盖
|
|
123
|
+
// 仅确保文件存在
|
|
122
124
|
const stylePath = path.join(ctx.targetDir, 'src/style.css')
|
|
123
|
-
|
|
124
|
-
|
|
125
|
+
if (!fs.existsSync(stylePath)) {
|
|
126
|
+
await fs.ensureDir(path.dirname(stylePath))
|
|
127
|
+
await fs.writeFile(stylePath, `@import "tailwindcss";`)
|
|
128
|
+
}
|
|
125
129
|
},
|
|
126
130
|
},
|
|
127
131
|
}
|
package/package.json
CHANGED