Skip to content

Commit

Permalink
Migrate examples to type: module (#4662)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
natemoo-re and natemoo-re committed Sep 13, 2022
1 parent 234057b commit 8cfb3fb
Show file tree
Hide file tree
Showing 25 changed files with 38 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/three-humans-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/tailwind': patch
---

Update README to reference a `.cjs` config file
1 change: 1 addition & 0 deletions examples/basics/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/basics",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/blog/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/blog",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
10 changes: 10 additions & 0 deletions examples/component/demo/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from 'astro/config';

// https://astro.build/config
export default defineConfig({
vite: {
ssr: {
noExternal: ['@example/my-component'],
},
},
});
1 change: 1 addition & 0 deletions examples/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/docs",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/framework-alpine/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/framework-alpine",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/framework-lit/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/framework-lit",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/framework-multiple",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/framework-preact/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/framework-preact",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/framework-react/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/framework-react",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/framework-solid/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/framework-solid",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/framework-svelte",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/framework-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/framework-vue",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/minimal/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/minimal",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/non-html-pages/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/non-html-pages",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/portfolio/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/portfolio",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/ssr/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/ssr",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/with-markdown-plugins/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/with-markdown-plugins",
"type": "module",
"version": "0.0.2",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/with-markdown-shiki/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/with-markdown-shiki",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/with-mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/with-mdx",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/with-nanostores/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/with-nanostores",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/with-tailwindcss",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/with-vite-plugin-pwa/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@example/with-vite-plugin-pwa",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion examples/with-vitest/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@example/with-vitest",
"version": "0.0.1",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "astro dev",
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/tailwind/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
})],
}
```
Expand Down

0 comments on commit 8cfb3fb

Please sign in to comment.