Open chunrapeepat opened 1 year ago
@chunza2542 does it work fine when you don't add the asset path ? (It should try to get the path from unpkg
in that case)
@ad1992, the script got blocked by Chrome manifest v3 policy. https://developer.chrome.com/docs/extensions/mv3/mv3-migration/#remotely-hosted-code
I got this error while trying to embed Excalidraw into my Chrome extension:
After installing the Excalidraw package, I copy the
excalidraw-assets
andexcalidraw-assets
to my static folder. Add that folder path toweb_accessible_resources
onmanifest.json
. Set thewindow.EXCALIDRAW_ASSET_PATH
tochrome.runtime.getURL('')
. And thevendor-d6ac...6a05.js
file is loaded correctly with status code 200.I've no idea why I got this error; I also tried embedding the same version of the Excalidraw pkg on
create-react-app
, but no errors happened. Not sure if there is something about my Webpack configuration.My Webpack Config:
```js const path = require('path'); const TerserPlugin = require('terser-webpack-plugin'); module.exports = { entry: {...}, output: { path: path.join(__dirname, 'dist/js'), filename: '[name].js', }, module: { rules: [ { exclude: /node_modules/, test: /\.tsx?$/, use: 'ts-loader', }, { exclude: /node_modules/, test: /\.(sa|sc|c)ss$/, use: ['css-loader', 'style-loader'], }, ], }, resolve: { extensions: ['.ts', '.tsx', '.js', '.jsx', '.css', '.scss'], }, optimization: { minimize: true, minimizer: [ new TerserPlugin({ terserOptions: { output: { ascii_only: true }, }, }), ], }, }; ```Is there any way to debug this issue?