Skip to content

Commit

Permalink
feat: change to use vite
Browse files Browse the repository at this point in the history
  • Loading branch information
khoilen committed Dec 10, 2024
1 parent 9817372 commit 925573c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 12 deletions.
11 changes: 6 additions & 5 deletions apps/nt-stylesheet/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "nt-stylesheet",
"version": "1.0.5-rc.4",
"version": "1.0.5-rc.1",
"description": "",
"packageManager": "[email protected]",
"scripts": {
"build:css": "pnpm exec postcss src/styles.scss -o dist/styles.css",
"publish:css": "pnpm rollup -c && npm publish dist/apps/nt-stylesheet"
"build": "pnpm vite build"
},
"engines": {
"node": "20"
Expand All @@ -20,9 +19,11 @@
"postcss": "^8.4.49",
"postcss-import": "^16.1.0",
"tailwindcss": "^3.4.0",
"typescript": "^5.6.3"
"typescript": "^5.6.3",
"vite": "^6.0.3"
},
"dependencies": {
"postcss-nesting": "^13.0.1"
"postcss-nesting": "^13.0.1",
"vite-plugin-sass-dts": "^1.3.29"
}
}
13 changes: 6 additions & 7 deletions apps/nt-stylesheet/src/styles.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
@use './base' as *;
@use './component' as *;

@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Mulish:wght@400;600&display=swap');

@import 'tailwindcss/base';
@import './base.scss';

@import 'tailwindcss/components';
@import './component.scss';

@import 'tailwindcss/utilities';
@tailwind base;
@tailwind components;
@tailwind utilities;
25 changes: 25 additions & 0 deletions apps/nt-stylesheet/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { defineConfig } from 'vite'
import tailwindcss from 'tailwindcss'
import autoprefixer from 'autoprefixer'
import viteSassDts from 'vite-plugin-sass-dts'

export default defineConfig({
build: {
outDir: 'dist',
cssCodeSplit: false,
rollupOptions: {
input: './src/styles.scss',
output: {
entryFileNames: 'styles.css',
chunkFileNames: 'styles.css',
assetFileNames: '[name].[ext]',
},
},
},
css: {
postcss: {
plugins: [tailwindcss(), autoprefixer()],
},
},
plugins: [viteSassDts()],
})

0 comments on commit 925573c

Please sign in to comment.