Remove further dependence on vite package (#1906)
* Remove further dependence on vite package * Adds a changeset * Add graymatter as a regular dep
This commit is contained in:
parent
05a2c48449
commit
c76821687d
3 changed files with 9 additions and 5 deletions
5
.changeset/few-pumpkins-report.md
Normal file
5
.changeset/few-pumpkins-report.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fix build by making vendored vite resolve to copy
|
|
@ -22469,7 +22469,7 @@ function terserPlugin(config) {
|
|||
// root with vite itself, so we have to pass in the basedir and resolve
|
||||
// terser first.
|
||||
// eslint-disable-next-line node/no-restricted-require
|
||||
const terserPath = require.resolve('vite/dist/node/terser', {
|
||||
const terserPath = require.resolve('../terser', {
|
||||
paths: [basedir]
|
||||
});
|
||||
return require(terserPath).minify(code, options);
|
||||
|
@ -43009,7 +43009,7 @@ async function doBuild(inlineConfig = {}) {
|
|||
const options = config.build;
|
||||
const ssr = !!options.ssr;
|
||||
const libOptions = options.lib;
|
||||
config.logger.info(source.cyan(`vite v${require('vite/package.json').version} ${source.green(`building ${ssr ? `SSR bundle ` : ``}for ${config.mode}...`)}`));
|
||||
config.logger.info(source.cyan(`vite v${require('../../../package.json').version} ${source.green(`building ${ssr ? `SSR bundle ` : ``}for ${config.mode}...`)}`));
|
||||
const resolve = (p) => path__default.resolve(config.root, p);
|
||||
const input = libOptions
|
||||
? resolve(libOptions.entry)
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
"@silvenon/remark-smartypants": "^1.0.0",
|
||||
"assert": "^2.0.0",
|
||||
"github-slugger": "^1.3.0",
|
||||
"gray-matter": "^4.0.3",
|
||||
"mdast-util-mdx-expression": "^1.1.1",
|
||||
"mdast-util-mdx-jsx": "^1.1.1",
|
||||
"micromark-extension-mdx-expression": "^1.0.0",
|
||||
|
@ -38,10 +39,8 @@
|
|||
"unist-util-map": "^3.0.0",
|
||||
"unist-util-visit": "^4.0.0"
|
||||
},
|
||||
"//": "Important that gray-matter is in devDependencies so it gets bundled by esbuild!",
|
||||
"devDependencies": {
|
||||
"@types/github-slugger": "^1.3.0",
|
||||
"@types/prismjs": "^1.16.6",
|
||||
"gray-matter": "^4.0.3"
|
||||
"@types/prismjs": "^1.16.6"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue