File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -162,16 +162,12 @@ Introduce all language packs (not recommended)
162162``` js
163163// vite.config.js
164164import { defineConfig } from ' vite' ;
165-
166165import prismjs from ' vite-plugin-prismjs' ;
167- import components from ' prismjs/components' ;
168-
169- const allLanguages = Object .keys (components .languages ).filter ((item ) => item !== ' meta' );
170166
171167export default defineConfig ({
172168 plugins: [
173169 prismjs ({
174- languages: allLanguages ,
170+ languages: ' all ' ,
175171 }),
176172 ],
177173});
Original file line number Diff line number Diff line change @@ -166,16 +166,12 @@ export default defineConfig({
166166``` js
167167// vite.config.js
168168import { defineConfig } from ' vite' ;
169-
170169import prismjs from ' vite-plugin-prismjs' ;
171- import components from ' prismjs/components' ;
172-
173- const allLanguages = Object .keys (components .languages ).filter ((item ) => item !== ' meta' );
174170
175171export default defineConfig ({
176172 plugins: [
177173 prismjs ({
178- languages: allLanguages ,
174+ languages: ' all ' ,
179175 }),
180176 ],
181177});
You can’t perform that action at this time.
0 commit comments