Hi, I copied the manifest.json file out of dist into the root folder and load the whole folder unpacked into chrome. (I cant load just the manifest in the dist folder, its giving me other errors).
But now, I am getting this error below regarding not able to import statement outside of module. Is this a new thing with chrome extensions?
Uncaught SyntaxError: Cannot use import statement outside a module
Context
_generated_background_page.html
Stack Trace
src/background.js:1 (anonymous function)
import 'babel-polyfill'; <--- this line is highlighted indicating its the cause of the error
import * as tf from '@tensorflow/tfjs';
import { IMAGENET_CLASSES } from './imagenet_classes';
const MOBILENET_MODEL_PATH = 'https://storage.googleapis.com/tfjs-models/tfjs/mobilenet_v1_0.25_224/model.json';
const IMAGE_SIZE = 224;
const TOPK_PREDICTIONS = 10;
class BackgroundProcessing {