extension-examples
extension-examples copied to clipboard
react helloworld-ts cannot run
ERROR in ./src/index.tsx
Module build failed (from ./node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/babel-loader/lib/index.js):
ValidationError: Invalid configuration object. Babel loader has been initialized using a configuration object that does not match the API schema.
- configuration should be an object:
object { cacheDirectory?, cacheIdentifier?, cacheCompression?, customize?, … }
tried in yarn and pnpm,
resolved by add options: {} in webpack.config.js
module: {
rules: [
{
test: /\.(js|jsx|ts|tsx)$/,
loader: "babel-loader",
exclude: /node_modules/,
include: /src/,
sideEffects: false,
options: {},
},
],
},