Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP/Broken]: Upgrade @tensorflow/tfjs versions to 3.x #1383

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft
8 changes: 8 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ module.exports = {
},
rules: {
"no-console": 0,
"arrow-body-style": 0,
"import/no-useless-path-segments": 0,
"no-constructor-return": 0,
"no-else-return": 0,
"default-param-last": 0,
"prefer-regex-literals": 0,
"prefer-object-spread": 0,
"lines-between-class-members": 0
},
env: {
browser: true,
Expand Down
33 changes: 3 additions & 30 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const path = require("path");
const webpackConfig = require("./webpack.common.babel");

module.exports = config => {
config.set({
Expand All @@ -20,38 +20,11 @@ module.exports = config => {
"src/utils/*.js": ["webpack"],
},
webpack: {
// TODO: This is duplication of the webpack.common.babel.js file, but they
// use different import syntaxes so it's not easy to just require it here.
// Maybe this could be put into a JSON file, but the include in the module
// rules is dynamic.
entry: ["@babel/polyfill", "./src/index.js"],
output: {
libraryTarget: "umd",
filename: "ml5.js",
library: "ml5",
},
module: {
rules: [
{
enforce: "pre",
test: /\.js$/,
exclude: /node_modules/,
loader: "eslint-loader",
},
{
test: /\.js$/,
loader: "babel-loader",
include: path.resolve(__dirname, "src"),
},
],
},
...webpackConfig,
// Don't minify the webpack build for better stack traces
optimization: {
minimize: false,
},
node: {
fs: "empty",
},
}
},
webpackMiddleware: {
noInfo: true,
Expand Down
Loading