babel-loader

Create React App requires a dependency: “babel-loader”: “8.1.0”

家住魔仙堡 提交于 2020-07-23 06:31:12
问题 There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you need to fix locall y. The react-scripts package provided by Create React App requires a dependency: "babel-loader": "8.1.0" Don't try to install it manually: your package manager does it automatically. However, a different version of babel-loader was detected higher up in the tree: D:\Reactjs\node_modules\babel-loader (version: 8.0.6) Manually installing incompatible

Create React App requires a dependency: “babel-loader”: “8.1.0”

我与影子孤独终老i 提交于 2020-07-23 06:29:16
问题 There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you need to fix locall y. The react-scripts package provided by Create React App requires a dependency: "babel-loader": "8.1.0" Don't try to install it manually: your package manager does it automatically. However, a different version of babel-loader was detected higher up in the tree: D:\Reactjs\node_modules\babel-loader (version: 8.0.6) Manually installing incompatible

Plugins[0][1] must be an object, false, or undefined

泄露秘密 提交于 2020-05-11 13:44:25
问题 I have been trying to upgrade my packages and things have started to fall apart and I am now unable to build and cannot seem to figure out what is the issue. I suspect the issue is related to the .babelrc file as it is a babel-loader error being thrown. .babelrc { "presets": [ ], "plugins": [ [ "react-hot-loader/babel", "transform-object-rest-spread" ], "@babel/plugin-syntax-dynamic-import", "@babel/plugin-syntax-import-meta", "@babel/plugin-proposal-class-properties", "@babel/plugin-proposal

Plugins[0][1] must be an object, false, or undefined

妖精的绣舞 提交于 2020-05-11 13:43:20
问题 I have been trying to upgrade my packages and things have started to fall apart and I am now unable to build and cannot seem to figure out what is the issue. I suspect the issue is related to the .babelrc file as it is a babel-loader error being thrown. .babelrc { "presets": [ ], "plugins": [ [ "react-hot-loader/babel", "transform-object-rest-spread" ], "@babel/plugin-syntax-dynamic-import", "@babel/plugin-syntax-import-meta", "@babel/plugin-proposal-class-properties", "@babel/plugin-proposal

*.default is not a constructor, with a imported js plugin

只愿长相守 提交于 2020-01-02 06:43:23
问题 I tried to create a simple form validation and registered this via yarn link in a example project to test the set up. But it absolutely doesn't work and I have no idea how to continue. export default class Proofr { constructor() { console.log('test'); } } This "script" is then generated by webpack , with eslint-loader and babel-loader (presets env & stage-0). So it shouldn't do much more than just for fun logging a message. But in when i try to call new Proofr() it tells me following: form.js

Transpiling Array.prototype.flat away with @babel?

空扰寡人 提交于 2019-12-29 07:38:28
问题 I inadvertently introduced a backwards compatibility issue in my React app by using Array.prototype.flat . I was very surprised this didn't get resolved by transpiling - I thought this would result in es2015 compatible code. How can I get Babel 7 to transpile this? (If my reading of the sources is right in Babel 6 there was still a plugin for this but since this has begun to roll out to browsers support has been dropped?) Tools: @babel/core@7.0.0 webpack@4.18.0 My top-level configuration

Webpack 4.36.1 not working with html-webpack-externals-plugin

与世无争的帅哥 提交于 2019-12-24 07:41:04
问题 I am migrating a library from webpack 1 to webpack 4. Which is to be consumed by another application with webpack 3. My libraries index.js looks like this, import * as config from './config'; export default class Helper{ constructor(options) { this.configurePaths({assetPath: options.assetPath || ''}); } configurePaths(configuration) { config.assetPath = configuration.assetPath || config.assetPath; } ... } Webpack of the library has: const path = require('path'); const env = require('yargs')

How to optionally process code in node_modules with babel-loader in webpack?

旧街凉风 提交于 2019-12-23 18:38:55
问题 This is a follow up from this answer. I have some 3rd party code (react components) that I bundle as ES modules (using the pkg.module entry point). This works great (you get module concatenation and tree shaking), but the included code isn't transpiled with babel because, following most config examples, I exclude node_modules in the babel-loader section of my webpack config like this: { ... module: { rules: [ { exclude: /(node_modules)/, use: { loader: 'babel-loader', ... } } ] }, ... } So, I

Webpack Babel-loader transpiles code with eval()

六眼飞鱼酱① 提交于 2019-12-23 09:39:18
问题 I'm having an issue with Webpack and Babel. I'm trying transpile my JavaScript code into a bundle file. Here's the file structure and the snippets: file structure: - src | file.js package.json webpack.config.js package.json: { "name": "babel-webpack-starter", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "build": "webpack --mode development" }, "author": "", "license": "ISC", "devDependencies": { "babel-core": "

Babel 7 - Decorators transform doesn't work with babel-loader

纵然是瞬间 提交于 2019-12-23 07:29:07
问题 I have a problem with decorators in React with mobX app. And it works ok with .babelrc , but I also have babel-loader with webpack . I copy babel config to webpack config, but it doesn't work. I checked all solutions that I can found in google, but they all refers to bebelrc , not webpack config. My webpack config: const path = require('path'); const webpack = require('webpack'); module.exports = { devtool: 'cheap-module-eval-source-map', entry: [ 'webpack-hot-middleware/client', 'babel