@newlogic-digital/core 4.0.0-rc.5 → 4.0.0-rc.7
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/index.js +10 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs'
|
|
2
2
|
import os from 'node:os'
|
|
3
|
-
import { resolve, join } from 'node:path'
|
|
3
|
+
import { resolve, join, dirname } from 'node:path'
|
|
4
4
|
import vituum from 'vituum'
|
|
5
|
-
import cssInline from '@vituum/vite-plugin-css-inline'
|
|
6
5
|
import send from '@vituum/vite-plugin-send'
|
|
7
6
|
import { getPackageInfo, deepMergeWith } from 'vituum/utils/common.js'
|
|
8
7
|
import browserslistToEsbuild from 'browserslist-to-esbuild'
|
|
@@ -10,6 +9,7 @@ import browserslist from 'browserslist'
|
|
|
10
9
|
import { Features as LightningCssFeatures, browserslistToTargets } from 'lightningcss'
|
|
11
10
|
import process from 'node:process'
|
|
12
11
|
import heroicons from '@newlogic-digital/vite-plugin-heroicons'
|
|
12
|
+
import { fileURLToPath } from 'node:url'
|
|
13
13
|
|
|
14
14
|
const { name } = getPackageInfo(import.meta.url)
|
|
15
15
|
|
|
@@ -98,13 +98,18 @@ const plugin = async (options = {}) => {
|
|
|
98
98
|
optionalPlugins.push(tailwindcss(options.tailwindcss))
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
if (options.cssInline.paths.length > 0) {
|
|
102
|
+
const cssInline = (await import('@vituum/vite-plugin-css-inline')).default
|
|
103
|
+
|
|
104
|
+
optionalPlugins.push(cssInline(options.cssInline))
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const simpleIcons = resolve(dirname((fileURLToPath(import.meta.url))), 'icons/simpleicons')
|
|
108
|
+
const solidIcons = resolve(dirname((fileURLToPath(import.meta.url))), 'icons/solid')
|
|
103
109
|
|
|
104
110
|
const plugins = [
|
|
105
111
|
vituum(options.vituum),
|
|
106
112
|
...optionalPlugins,
|
|
107
|
-
cssInline(options.cssInline),
|
|
108
113
|
send(options.send),
|
|
109
114
|
heroicons(
|
|
110
115
|
{
|
package/package.json
CHANGED