DigitalConsumer.FixMyGlass/vue.config.js
Matt Sykes 90bc0a3684 Vue module augmentation and Convert main.js to main.ts
1. Vue module augmentation (src/shims-vue.d.ts)
*Added ComponentCustomProperties so this.$store is typed as Store<RootState> in components.
*Extended Window for $ and jQuery so the jQuery global assignment type-checks.
2. Convert main.js to main.ts
*Renamed main.js to main.ts.
*Removed the vue.config.js entry override so the Vue CLI TypeScript plugin uses main.ts.
*Updated jest.config.js to exclude main.ts from coverage.
*Adjusted the error handler to use unknown for err and vm to match Vue’s types.
*Added as unknown to the jQuery require for type safety.
2026-03-09 14:19:18 -04:00

28 lines
878 B
JavaScript

const webpack = require('webpack');
const { environmentVariablesWithDefaults } = require('./environment-variables.js');
module.exports = {
outputDir: "dist/fmg",
publicPath: "/fmg",
css: {
loaderOptions: {
sass: {
// Load Order Matters!!!
// Note: only include functions, variables and mixins here
prependData: `
@import "./node_modules/bootstrap/scss/functions";
@import "@/styles/ux-variables.scss";
@import "./node_modules/bootstrap/scss/variables";
@import "./node_modules/bootstrap/scss/mixins";
@import "@/styles/mixins/customMixins";
`,
},
},
},
configureWebpack: {
devtool: "source-map",
plugins: [
new webpack.EnvironmentPlugin(environmentVariablesWithDefaults),
],
},
};