diff --git a/package-lock.json b/package-lock.json index 8afd75e661..4d66b74839 100644 --- a/package-lock.json +++ b/package-lock.json @@ -96,8 +96,7 @@ "rollup-plugin-polyfill-node": "^0.12.0", "rollup-plugin-terser": "^7.0.2", "vite": "^4.2.1", - "vite-plugin-mpa": "^1.1.4", - "vite-plugin-plain-text": "^1.4.2" + "vite-plugin-mpa": "^1.1.4" }, "optionalDependencies": { "cypress": "^10.11.0", @@ -11655,41 +11654,6 @@ "yargs": "16.2.0" } }, - "node_modules/vite-plugin-plain-text": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/vite-plugin-plain-text/-/vite-plugin-plain-text-1.4.2.tgz", - "integrity": "sha512-nkCWW16lkTidaGZ9kItwMZ5OEkUeXMrY4Okc9IQXrN/p6SAuDYmEiGqMRKl1rnhm6CR1h98uJtn+ODkv0cL7DA==", - "dev": true, - "dependencies": { - "@napi-rs/magic-string": "^0.3.4", - "fast-glob": "^3.2.12", - "minimatch": "^6.1.6" - } - }, - "node_modules/vite-plugin-plain-text/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/vite-plugin-plain-text/node_modules/minimatch": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-6.2.0.tgz", - "integrity": "sha512-sauLxniAmvnhhRjFwPNnJKaPFYyddAgbYdeUpHULtCT/GhzdCx/MDNy+Y40lBxTQUrMzDE8e0S43Z5uqfO0REg==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/vite/node_modules/esbuild": { "version": "0.17.12", "dev": true, diff --git a/package.json b/package.json index 59326412c6..9572fe7677 100644 --- a/package.json +++ b/package.json @@ -113,8 +113,7 @@ "rollup-plugin-polyfill-node": "^0.12.0", "rollup-plugin-terser": "^7.0.2", "vite": "^4.2.1", - "vite-plugin-mpa": "^1.1.4", - "vite-plugin-plain-text": "^1.4.2" + "vite-plugin-mpa": "^1.1.4" }, "optionalDependencies": { "cypress": "^10.11.0", diff --git a/src/Tools/cypressTest/CypressTest.jsx b/src/Tools/cypressTest/CypressTest.jsx index dc18a631fc..c9ceece9d3 100644 --- a/src/Tools/cypressTest/CypressTest.jsx +++ b/src/Tools/cypressTest/CypressTest.jsx @@ -1,7 +1,7 @@ import React, { useState, useEffect, useRef } from 'react'; import PageViewer from '../../Viewer/PageViewer.jsx'; import ActivityViewer from '../../Viewer/ActivityViewer.jsx'; -// import {plainText as testCodeDoenetML } from './testCode.doenet'; +// import testCodeDoenetML from './testCode.doenet?raw'; function Test() { // console.log("===Test") diff --git a/src/Tools/temp/MathInput.jsx b/src/Tools/temp/MathInput.jsx index dced179ae9..dee2c1dc8a 100644 --- a/src/Tools/temp/MathInput.jsx +++ b/src/Tools/temp/MathInput.jsx @@ -1,6 +1,6 @@ import React, { useState, useEffect, useRef } from 'react'; import DoenetViewer from '../../Tools/_framework/ToolPanels/AssignmentViewer'; -import {plainText as testCodeDoenetML } from './testCode.doenet'; +import testCodeDoenetML from './testCode.doenet?raw'; import core from '../../Core/Core'; // import MathInputPallet from '../_framework/temp/MathInputPallet' diff --git a/src/Tools/test/DoenetTest.jsx b/src/Tools/test/DoenetTest.jsx index 493642a1fc..6216cf96f6 100644 --- a/src/Tools/test/DoenetTest.jsx +++ b/src/Tools/test/DoenetTest.jsx @@ -1,8 +1,8 @@ import React, { useState, useEffect, useRef } from 'react'; import ActivityViewer from '../../Viewer/ActivityViewer.jsx'; import PageViewer from '../../Viewer/PageViewer.jsx'; -import {plainText as testActivityDefinition } from './testActivityDefinition.doenet'; -import {plainText as testCodeDoenetML } from './testCode.doenet'; +import testActivityDefinition from './testActivityDefinition.doenet?raw'; +import testCodeDoenetML from './testCode.doenet?raw'; import { MathJaxContext } from "better-react-mathjax"; import { mathjaxConfig } from '../../Core/utils/math.js'; diff --git a/vite.config.js b/vite.config.js index 3129263cb1..728c6e8313 100644 --- a/vite.config.js +++ b/vite.config.js @@ -4,14 +4,11 @@ import react from '@vitejs/plugin-react'; import nodePolyfills from 'rollup-plugin-polyfill-node'; import { defineConfig } from 'vite'; import { resolve } from 'path'; -import plainText from 'vite-plugin-plain-text'; export default defineConfig((env) => ({ appType: 'mpa', plugins: [ - react(), - plainText(/\/testActivityDefinition\.doenet/), - plainText(/\/testCode\.doenet/), + react() ], server: { port: 8000,