Skip to content

Chore: update @sveltejs/kit #181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"prepublishOnly": "yarn clean && yarn build",
"pretest:base": "cross-env DEBUG=eslint-plugin-svelte*",
"preversion": "yarn test && git add .",
"svelte-kit": "node --experimental-loader ./svelte-kit-import-hook.mjs node_modules/@sveltejs/kit/svelte-kit.js",
"svelte-kit": "node --experimental-loader ./svelte-kit-import-hook.mjs node_modules/vite/bin/vite.js --config vite.config.mjs",
"test": "yarn mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
"ts": "node -r esbuild-register",
"update": "yarn ts ./tools/update.ts && yarn format-for-gen-file",
Expand Down Expand Up @@ -77,7 +77,7 @@
"@ota-meshi/eslint-plugin": "^0.11.0",
"@sindresorhus/slugify": "^2.1.0",
"@sveltejs/adapter-static": "^1.0.0-next.26",
"@sveltejs/kit": "1.0.0-next.358",
"@sveltejs/kit": "^1.0.0-next.360",
"@types/babel__core": "^7.1.19",
"@types/eslint": "^8.0.0",
"@types/eslint-scope": "^3.7.0",
Expand Down Expand Up @@ -134,6 +134,7 @@
"svelte": "^3.46.1",
"svelte-adapter-ghpages": "0.0.2",
"typescript": "^4.5.2",
"vite": "^2.9.13",
"vite-plugin-svelte-md": "^0.1.3"
},
"publishConfig": {
Expand Down
3 changes: 1 addition & 2 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@
"depTypeList": ["devDependencies"],
"automerge": true
}
],
"ignoreDeps": ["@sveltejs/kit"]
]
}
44 changes: 0 additions & 44 deletions svelte.config.esm.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
/* global __dirname, URL -- __dirname, URL */
import ghpagesAdapter from "svelte-adapter-ghpages"
import path from "path"
import svelteMd from "vite-plugin-svelte-md"
import svelteMdOption from "./docs-svelte-kit/tools/vite-plugin-svelte-md-option.mjs"

import "./docs-svelte-kit/build-system/build.js"

const dirname =
typeof __dirname !== "undefined"
Expand Down Expand Up @@ -41,46 +37,6 @@ const config = {
},

trailingSlash: "always",

vite: {
server: {
fs: { strict: false },
},
resolve: {
alias: {
eslint: path.join(dirname, "./docs-svelte-kit/shim/eslint.mjs"),
assert: path.join(dirname, "./docs-svelte-kit/shim/assert.mjs"),
"postcss-load-config": path.join(
dirname,
"./docs-svelte-kit/shim/postcss-load-config.mjs",
),
"source-map-js": path.join(
dirname,
"./docs-svelte-kit/shim/source-map-js.mjs",
),
module: path.join(dirname, "./docs-svelte-kit/shim/module.mjs"),
path: path.join(dirname, "./docs-svelte-kit/shim/path.mjs"),
url: path.join(dirname, "./docs-svelte-kit/shim/url.mjs"),
os: path.join(dirname, "./docs-svelte-kit/shim/os.mjs"),
fs: path.join(dirname, "./docs-svelte-kit/shim/fs.mjs"),
globby: path.join(dirname, "./docs-svelte-kit/shim/globby.mjs"),
tslib: path.join(dirname, "./node_modules/tslib/tslib.es6.js"),
},
},
plugins: [
svelteMd(
svelteMdOption({
baseUrl: "/eslint-plugin-svelte",
root: path.join(dirname, "./docs"),
}),
),
],
build: {
commonjsOptions: {
ignoreDynamicRequires: true,
},
},
},
},
}
export default config
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2015",
"target": "es2020",
"module": "commonjs",
"lib": ["es2020", "dom"],
"allowJs": true,
Expand Down
53 changes: 53 additions & 0 deletions vite.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/* global URL -- URL */
import { sveltekit } from "@sveltejs/kit/vite"
import path from "path"
import svelteMd from "vite-plugin-svelte-md"
import svelteMdOption from "./docs-svelte-kit/tools/vite-plugin-svelte-md-option.mjs"

import "./docs-svelte-kit/build-system/build.js"

const dirname = path.dirname(new URL(import.meta.url).pathname)

/** @type {import('vite').UserConfig} */
const config = {
plugins: [
svelteMd(
svelteMdOption({
baseUrl: "/eslint-plugin-svelte",
root: path.join(dirname, "./docs"),
}),
),
sveltekit(),
],
server: {
fs: { strict: false },
},
resolve: {
alias: {
eslint: path.join(dirname, "./docs-svelte-kit/shim/eslint.mjs"),
assert: path.join(dirname, "./docs-svelte-kit/shim/assert.mjs"),
"postcss-load-config": path.join(
dirname,
"./docs-svelte-kit/shim/postcss-load-config.mjs",
),
"source-map-js": path.join(
dirname,
"./docs-svelte-kit/shim/source-map-js.mjs",
),
module: path.join(dirname, "./docs-svelte-kit/shim/module.mjs"),
path: path.join(dirname, "./docs-svelte-kit/shim/path.mjs"),
url: path.join(dirname, "./docs-svelte-kit/shim/url.mjs"),
os: path.join(dirname, "./docs-svelte-kit/shim/os.mjs"),
fs: path.join(dirname, "./docs-svelte-kit/shim/fs.mjs"),
globby: path.join(dirname, "./docs-svelte-kit/shim/globby.mjs"),
tslib: path.join(dirname, "./node_modules/tslib/tslib.es6.js"),
},
},
build: {
commonjsOptions: {
ignoreDynamicRequires: true,
},
},
}

export default config