Migrate examples to type: module
(#4662)
* chore: move examples to type module * chore: prefer astro.config.mjs to astro.config.js * chore: reference CJS config file Co-authored-by: Nate Moore <nate@astro.build>
This commit is contained in:
parent
234057b020
commit
8cfb3fb535
25 changed files with 38 additions and 2 deletions
5
.changeset/three-humans-promise.md
Normal file
5
.changeset/three-humans-promise.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@astrojs/tailwind': patch
|
||||
---
|
||||
|
||||
Update README to reference a `.cjs` config file
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/basics",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/blog",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
10
examples/component/demo/astro.config.mjs
Normal file
10
examples/component/demo/astro.config.mjs
Normal file
|
@ -0,0 +1,10 @@
|
|||
import { defineConfig } from 'astro/config';
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
vite: {
|
||||
ssr: {
|
||||
noExternal: ['@example/my-component'],
|
||||
},
|
||||
},
|
||||
});
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/docs",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/framework-alpine",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/framework-lit",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/framework-multiple",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/framework-preact",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/framework-react",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/framework-solid",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/framework-svelte",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/framework-vue",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/minimal",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/non-html-pages",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/portfolio",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/ssr",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/with-markdown-plugins",
|
||||
"type": "module",
|
||||
"version": "0.0.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/with-markdown-shiki",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/with-mdx",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/with-nanostores",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/with-tailwindcss",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@example/with-vite-plugin-pwa",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@example/with-vitest",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
|
|
|
@ -93,7 +93,7 @@ import tailwind from '@astrojs/tailwind';
|
|||
export default {
|
||||
integrations: [tailwind({
|
||||
// Example: Provide a custom path to a Tailwind config file
|
||||
config: { path: './custom-config.js' },
|
||||
config: { path: './custom-config.cjs' },
|
||||
})],
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue