Custom ContentType configuration #96
AlphaZeroUno
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I was asking for help regarding particular files with the .navy extension that are not being handled correctly.
When I import the file with the .navy extension in main.js
import Custom from "./custom.navy";
I have the following error
"Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "application/octet-stream". Strict MIME type checking is enforced for module scripts per HTML spec."
In the original project night-vision was added in the vite.config.js file.
and associated with a "vite-raw-plugin.js" file.
How do I report this configuration with middleware management?
Thank you
vite.config.js ( project night-vision)
import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import { resolve } from "path";
import viteRawPlugin from "./vite/vite-raw-plugin.js";
import banner from "vite-plugin-banner";
import pkg from "./package.json";
// https://vitejs.dev/config/
export default defineConfig({
root: "src",
plugins: [
banner({
content:
/* NightVisionCharts v${pkg.version} | License: MIT\n
+© 2022 ChartMaster. All rights reserved */
,outDir: "../dist",
}),
svelte({
emitCss: false,
}),
viteRawPlugin({
fileRegex: /.navy$/,
}),
],
server: {
port: 8085,
},
build: {
target: "es2018",
outDir: "../dist",
emptyOutDir: true,
lib: {
entry: resolve(__dirname, "src/index.js"),
name: "NightVision",
fileName: "night-vision",
},
rollupOptions: {
output: {
manualChunks: undefined,
}
},
minify: false,
},
});
Beta Was this translation helpful? Give feedback.
All reactions