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'
1212 * @example
1313 * ```ts
1414 * 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+ ```
2019 */
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'
1212 * @example
1313 * ```ts
1414 * // farm.config.js
15- * import LightningCSS from 'unplugin-lightningcss/farm'
15+ * import Starter from 'unplugin-lightningcss/farm'
1616 *
1717 * export default {
18- * plugins: [LightningCSS ()],
18+ * plugins: [Starter ()],
1919 * }
2020 * ```
2121 */
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'
1212 * @example
1313 * ```ts
1414 * // rolldown.config.js
15- * import LightningCSS from 'unplugin-lightningcss/rolldown'
15+ * import Starter from 'unplugin-lightningcss/rolldown'
1616 *
1717 * export default {
18- * plugins: [LightningCSS ()],
18+ * plugins: [Starter ()],
1919 * }
2020 * ```
2121 */
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'
1212 * @example
1313 * ```ts
1414 * // rollup.config.js
15- * import LightningCSS from 'unplugin-lightningcss/rollup'
15+ * import Starter from 'unplugin-lightningcss/rollup'
1616 *
1717 * export default {
18- * plugins: [LightningCSS ()],
18+ * plugins: [Starter ()],
1919 * }
2020 * ```
2121 */
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 11/**
2- * This entry file is for Vite plugin.
2+ * This entry file is for Rspack plugin.
33 *
44 * @module
55 */
66
77import LightningCSS from './index'
88
99/**
10- * Vite plugin
10+ * Rspack plugin
1111 *
1212 * @example
13- * ```ts
13+ * ```js
1414 * // rspack.config.js
1515 * import LightningCSS from 'unplugin-lightningcss/rspack'
1616 *
17- * export default {
18- * plugins: [LightningCSS()],
17+ * default export {
18+ * plugins: [LightningCSS()],
1919 * }
2020 * ```
2121 */
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'
1111 *
1212 * @example
1313 * ```ts
14- * // vite.config.js
15- * import LightningCSS from 'unplugin-lightningcss/vite'
14+ * // vite.config.ts
15+ * import Starter from 'unplugin-lightningcss/vite'
1616 *
17- * export default {
18- * plugins: [LightningCSS ()],
19- * }
17+ * export default defineConfig( {
18+ * plugins: [Starter ()],
19+ * })
2020 * ```
2121 */
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 11/**
2- * This entry file is for Vite plugin.
2+ * This entry file is for webpack plugin.
33 *
44 * @module
55 */
66
77import LightningCSS from './index'
88
99/**
10- * Vite plugin
10+ * Webpack plugin
1111 *
1212 * @example
13- * ```ts
13+ * ```js
1414 * // webpack.config.js
1515 * import LightningCSS from 'unplugin-lightningcss/webpack'
1616 *
17- * export default {
18- * plugins: [LightningCSS()],
17+ * default export {
18+ * plugins: [LightningCSS()],
1919 * }
2020 * ```
2121 */
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