Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions frontend/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tabWidth": 2,
"useTabs": false
}
10 changes: 5 additions & 5 deletions frontend/configs/webpack/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,19 @@ module.exports = {
{
from: "src/assets",
to: "assets",
}
]
},
],
}),
new HtmlWebpackPlugin({
template: "./src/assets/index.html",
favicon: "./src/assets/favicon.png"
favicon: "./src/assets/favicon.png",
}),
new FriendlyErrorsWebpackPlugin(),
new webpack.ProvidePlugin({
process: "process/browser",
}),
],
experiments: {
topLevelAwait: true
}
topLevelAwait: true,
},
};
4 changes: 2 additions & 2 deletions frontend/configs/webpack/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ module.exports = merge(commonConfig, {
open: true,
historyApiFallback: true,
// These headers enable the cross origin isolation state
// needed to enable use of SharedArrayBuffer for ONNX
// multithreading.
// needed to enable use of SharedArrayBuffer for ONNX
// multithreading.
headers: {
"Cross-Origin-Opener-Policy": "same-origin",
"Cross-Origin-Embedder-Policy": "credentialless",
Expand Down
5 changes: 3 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"lint": "eslint './src/**/*.{js,ts,tsx}' --quiet",
"start": "yarn run start-dev",
"test": "yarn run start-model-test",
"start-dev": "webpack serve --config=configs/webpack/dev.js"
"start-dev": "webpack serve --config=configs/webpack/dev.js",
"pretty": "prettier --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json}\""
},
"devDependencies": {
"@babel/core": "^7.18.13",
Expand Down Expand Up @@ -65,4 +66,4 @@
"@types/react-dom": "18.2.0",
"@types/react": "18.2.0"
}
}
}
2 changes: 1 addition & 1 deletion frontend/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const tailwindcss = require("tailwindcss");
module.exports = {
plugins: ["postcss-preset-env", 'tailwindcss/nesting', tailwindcss],
plugins: ["postcss-preset-env", "tailwindcss/nesting", tailwindcss],
};
Loading