File tree Expand file tree Collapse file tree 7 files changed +46
-33
lines changed Expand file tree Collapse file tree 7 files changed +46
-33
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,11 @@ import LightningCSS from './index'
12
12
* @example
13
13
* ```ts
14
14
* import { build } from 'esbuild'
15
- *
16
- * build({
17
- * plugins: [require('unplugin-lightningcss/esbuild')()],
18
- * })
19
- * ```
15
+ * import LightningCSS from 'unplugin-lightningcss/esbuild'
16
+ *
17
+ * build({ plugins: [LightningCSS()] })
18
+ ```
20
19
*/
21
- export default LightningCSS . esbuild as typeof LightningCSS . esbuild
20
+ const esbuild = LightningCSS . esbuild as typeof LightningCSS . esbuild
21
+ export default esbuild
22
+ export { esbuild as 'module.exports' }
Original file line number Diff line number Diff line change @@ -12,11 +12,13 @@ import LightningCSS from './index'
12
12
* @example
13
13
* ```ts
14
14
* // farm.config.js
15
- * import LightningCSS from 'unplugin-lightningcss/farm'
15
+ * import Starter from 'unplugin-lightningcss/farm'
16
16
*
17
17
* export default {
18
- * plugins: [LightningCSS ()],
18
+ * plugins: [Starter ()],
19
19
* }
20
20
* ```
21
21
*/
22
- export default LightningCSS . farm as typeof LightningCSS . farm
22
+ const farm = LightningCSS . farm as typeof LightningCSS . farm
23
+ export default farm
24
+ export { farm as 'module.exports' }
Original file line number Diff line number Diff line change @@ -12,11 +12,13 @@ import LightningCSS from './index'
12
12
* @example
13
13
* ```ts
14
14
* // rolldown.config.js
15
- * import LightningCSS from 'unplugin-lightningcss/rolldown'
15
+ * import Starter from 'unplugin-lightningcss/rolldown'
16
16
*
17
17
* export default {
18
- * plugins: [LightningCSS ()],
18
+ * plugins: [Starter ()],
19
19
* }
20
20
* ```
21
21
*/
22
- export default LightningCSS . rolldown as typeof LightningCSS . rolldown
22
+ const rolldown = LightningCSS . rolldown as typeof LightningCSS . rolldown
23
+ export default rolldown
24
+ export { rolldown as 'module.exports' }
Original file line number Diff line number Diff line change @@ -12,11 +12,13 @@ import LightningCSS from './index'
12
12
* @example
13
13
* ```ts
14
14
* // rollup.config.js
15
- * import LightningCSS from 'unplugin-lightningcss/rollup'
15
+ * import Starter from 'unplugin-lightningcss/rollup'
16
16
*
17
17
* export default {
18
- * plugins: [LightningCSS ()],
18
+ * plugins: [Starter ()],
19
19
* }
20
20
* ```
21
21
*/
22
- export default LightningCSS . rollup as typeof LightningCSS . rollup
22
+ const rollup = LightningCSS . rollup as typeof LightningCSS . rollup
23
+ export default rollup
24
+ export { rollup as 'module.exports' }
Original file line number Diff line number Diff line change 1
1
/**
2
- * This entry file is for Vite plugin.
2
+ * This entry file is for Rspack plugin.
3
3
*
4
4
* @module
5
5
*/
6
6
7
7
import LightningCSS from './index'
8
8
9
9
/**
10
- * Vite plugin
10
+ * Rspack plugin
11
11
*
12
12
* @example
13
- * ```ts
13
+ * ```js
14
14
* // rspack.config.js
15
15
* import LightningCSS from 'unplugin-lightningcss/rspack'
16
16
*
17
- * export default {
18
- * plugins: [LightningCSS()],
17
+ * default export {
18
+ * plugins: [LightningCSS()],
19
19
* }
20
20
* ```
21
21
*/
22
- export default LightningCSS . rspack as typeof LightningCSS . rspack
22
+ const rspack = LightningCSS . rspack as typeof LightningCSS . rspack
23
+ export default rspack
24
+ export { rspack as 'module.exports' }
Original file line number Diff line number Diff line change @@ -11,12 +11,14 @@ import LightningCSS from './index'
11
11
*
12
12
* @example
13
13
* ```ts
14
- * // vite.config.js
15
- * import LightningCSS from 'unplugin-lightningcss/vite'
14
+ * // vite.config.ts
15
+ * import Starter from 'unplugin-lightningcss/vite'
16
16
*
17
- * export default {
18
- * plugins: [LightningCSS ()],
19
- * }
17
+ * export default defineConfig( {
18
+ * plugins: [Starter ()],
19
+ * })
20
20
* ```
21
21
*/
22
- export default LightningCSS . vite as typeof LightningCSS . vite
22
+ const vite = LightningCSS . vite as typeof LightningCSS . vite
23
+ export default vite
24
+ export { vite as 'module.exports' }
Original file line number Diff line number Diff line change 1
1
/**
2
- * This entry file is for Vite plugin.
2
+ * This entry file is for webpack plugin.
3
3
*
4
4
* @module
5
5
*/
6
6
7
7
import LightningCSS from './index'
8
8
9
9
/**
10
- * Vite plugin
10
+ * Webpack plugin
11
11
*
12
12
* @example
13
- * ```ts
13
+ * ```js
14
14
* // webpack.config.js
15
15
* import LightningCSS from 'unplugin-lightningcss/webpack'
16
16
*
17
- * export default {
18
- * plugins: [LightningCSS()],
17
+ * default export {
18
+ * plugins: [LightningCSS()],
19
19
* }
20
20
* ```
21
21
*/
22
- export default LightningCSS . webpack as typeof LightningCSS . webpack
22
+ const webpack = LightningCSS . webpack as typeof LightningCSS . webpack
23
+ export default webpack
24
+ export { webpack as 'module.exports' }
You can’t perform that action at this time.
0 commit comments