u
Size: a a a
u
A
LK
ERROR in ./src/taskpane/screens/main-screen/index.tsx 107:65- не пойму почему babel-loader ругаеться
Module parse failed: Unexpected token (107:65)
File was processed with these loaders:
* ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| var getTitleStyle = function getTitleStyle() {
| // const newDoc = doc.document.cloneNode(true) as Document;
> var titleFontSize = EditorModel.document.styles['TitleChar']?.runStyles.styles.find(function (s) {
| return s.tagName === 'w:sz';
| }); // console.log('titleFontSize', titleFontSize)
@ ./src/taskpane/router/index.tsx 20:0-52 46:15-25
@ ./src/taskpane/App.tsx
@ ./src/taskpane/index.tsx
@ multi ./node_modules/react-hot-loader/patch.js (webpack)-dev-server/client/index.js (webpack)/hot/only-dev-server.js ./src/taskpane/index.tsx
LK
LK
{
test: /\.(j|t)s(x)?$/,
loader: require.resolve('babel-loader'),
options: {
// customize: require.resolve(
// 'babel-preset-react-app/webpack-overrides'
// ),
babelrc: false,
presets: [
[
require.resolve("@babel/preset-env"),
{ targets: { browsers: "last 2 versions" } } // or whatever your project requires
],
require.resolve("@babel/preset-typescript"),
require.resolve("@babel/preset-react")
],
plugins: [
[
require.resolve('babel-plugin-macros'),
],
[
require.resolve('babel-plugin-named-asset-import'),
{
loaderMap: {
svg: {
ReactComponent:
'@svgr/webpack?-svgo,+titleProp,+ref![path]',
},
},
},
],
// plugin-proposal-decorators is only needed if you're using experimental decorators in TypeScript
[require.resolve("@babel/plugin-proposal-decorators"), { legacy: true }],
[require.resolve("@babel/plugin-proposal-class-properties"), { loose: true }],
[require.resolve("react-hot-loader/babel")]
],
// This is a feature of `babel-loader` for webpack (not Babel itself).
// It enables caching results in ./node_modules/.cache/babel-loader/
// directory for faster rebuilds.
cacheDirectory: true,
// See #6846 for context on why cacheCompression is disabled
cacheCompression: false,
compact: false,
},
},
A
A
ERROR in ./src/taskpane/screens/main-screen/index.tsx 107:65- не пойму почему babel-loader ругаеться
Module parse failed: Unexpected token (107:65)
File was processed with these loaders:
* ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| var getTitleStyle = function getTitleStyle() {
| // const newDoc = doc.document.cloneNode(true) as Document;
> var titleFontSize = EditorModel.document.styles['TitleChar']?.runStyles.styles.find(function (s) {
| return s.tagName === 'w:sz';
| }); // console.log('titleFontSize', titleFontSize)
@ ./src/taskpane/router/index.tsx 20:0-52 46:15-25
@ ./src/taskpane/App.tsx
@ ./src/taskpane/index.tsx
@ multi ./node_modules/react-hot-loader/patch.js (webpack)-dev-server/client/index.js (webpack)/hot/only-dev-server.js ./src/taskpane/index.tsx
LK
LK
el
LK
LK
A
A
LK
LK
LK