Skip to content

Commit c05e601

Browse files
chore: ts/esm support (#6)
* chore: ts/esm support * chore: ignore node 12 tests for now * chore: add local-plugin to workaround dep caching in ci * fix: relative import for config file * fix: try esbuild * fix: external next * fix: only external fsevents * fix: external react * fix: use zisi * fix: work out next root relative to function * fix: delete autogenerated config * fix: don't use esbuild Co-authored-by: Matt Kane <[email protected]>
1 parent 6b4f995 commit c05e601

File tree

12 files changed

+1581
-445
lines changed

12 files changed

+1581
-445
lines changed

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [ubuntu-latest, macOS-latest, windows-latest]
15-
node-version: [12, '*']
15+
node-version: ['*']
1616
exclude:
1717
- os: macOS-latest
1818
node-version: 12

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,5 @@ Temporary Items
144144
# CLI
145145
.netlify
146146
demo/.next
147+
.parcel-cache
148+
lib

build.config.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default {
2+
entries: [{ input: './src/', format: 'cjs' }],
3+
outDir: 'lib',
4+
}

demo/local-plugin/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('../..')

demo/local-plugin/manifest.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
name: '@netlify/plugin-nextjs-local'

demo/local-plugin/package-lock.json

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/local-plugin/package.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "local-plugin",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"preinstall": "cd ../.. && npm i"
8+
},
9+
"author": "",
10+
"license": "ISC"
11+
}

demo/netlify.toml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[build]
2+
command = "next build"
3+
publish = ".next"
4+
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../"
5+
6+
[dev]
7+
framework = "#static"
8+
9+
[[plugins]]
10+
package = "./local-plugin"
11+
12+
[[plugins]]
13+
package = "@netlify/plugin-local-install-core"

netlify.toml

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
[build]
2-
command = "npm run build:demo"
3-
functions = "demo/netlify/functions"
4-
publish = "demo/.next"
5-
framework="#custom"
6-
base="."
2+
base="demo/"
73

8-
[[plugins]]
9-
package="."

0 commit comments

Comments
 (0)