We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moved from babel/babel-loader#674 but will need a full reproduction example.
Webpack Version: ^4.17.2
Babel Core Version: 7.0
Babel Loader Version: ^8.0.0-beta.6
Please tell us about your environment: Windows 7
Current behavior: I upgraded my babel configuration from ^7.0.0-rc.2 to ^7.0.0, and then the compilation failed.
^7.0.0-rc.2
^7.0.0
package.json:
package.json
"@babel/core": "^7.0.0", "@babel/plugin-proposal-class-properties": "^7.0.0", "@babel/plugin-proposal-decorators": "^7.0.0", "@babel/plugin-proposal-do-expressions": "^7.0.0", "@babel/plugin-proposal-export-default-from": "^7.0.0", "@babel/plugin-proposal-export-namespace-from": "^7.0.0", "@babel/plugin-proposal-optional-chaining": "^7.0.0", "@babel/plugin-proposal-throw-expressions": "^7.0.0", "@babel/plugin-syntax-dynamic-import": "^7.0.0", "@babel/plugin-syntax-import-meta": "^7.0.0", "@babel/plugin-transform-runtime": "^7.0.0", "@babel/preset-env": "^7.0.0", "@babel/preset-react": "^7.0.0", "@babel/preset-typescript": "^7.0.0", "@babel/runtime": "^7.0.0", "babel-loader": "^8.0.0-beta.6",
.babelrc
{ "env": { "development": { "plugins": [ "dynamic-import-node", "react-hot-loader/babel", "dva-hmr", ["import", { "libraryName": "antd", "style": "css" }] ] } }, "presets": [ [ "@babel/preset-env", { "modules": false, "targets": { "browsers": ["IE >= 9"] }, "useBuiltIns": "usage" } ], "@babel/preset-typescript", "@babel/preset-react" ], "plugins": [ [ "@babel/transform-runtime", { "helpers": false } ], ["@babel/plugin-proposal-decorators", { "legacy": true }], ["@babel/plugin-proposal-class-properties", { "loose": true }], "@babel/proposal-do-expressions", "@babel/proposal-export-default-from", "@babel/proposal-export-namespace-from", "@babel/proposal-optional-chaining", "@babel/proposal-throw-expressions", "@babel/syntax-dynamic-import", "@babel/syntax-import-meta" ] }
output the following:
./src/pages/xshare-managment/router.tsx Module build failed (from ./node_modules/babel-loader/lib/index.js): TypeError: Cannot read property 'file' of undefined
I tried set @babel/preset-env to ^7.0.0-rc.2 and compiled successfully!
@babel/preset-env
Expected/desired behavior:
@babel/preset-env: ^7.0.0
The text was updated successfully, but these errors were encountered:
cannot read property 'file' of undefined
babel/babel-loader#674 (comment)
Sorry, something went wrong.
const a = "b"; const l = 'c'; const obj = { b: 1, c: 2 }; const { [a]: e, [l]: k, ...rest } = obj;
with dva-hmr plugin, this code trigger the bug. @loganfsmyth any progress?
Successfully merging a pull request may close this issue.
Moved from babel/babel-loader#674 but will need a full reproduction example.
Webpack Version:
^4.17.2
Babel Core Version:
7.0
Babel Loader Version:
^8.0.0-beta.6
Please tell us about your environment:
Windows 7
Current behavior:
I upgraded my babel configuration from
^7.0.0-rc.2
to^7.0.0
, and then the compilation failed.package.json
:.babelrc
output the following:
I tried set
@babel/preset-env
to^7.0.0-rc.2
and compiled successfully!Expected/desired behavior:
use
@babel/preset-env: ^7.0.0
and compiled successfully!The text was updated successfully, but these errors were encountered: