Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
yvele committed Jan 4, 2023
0 parents commit 50341f5
Show file tree
Hide file tree
Showing 11 changed files with 6,041 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 110

[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# git - mergetool
*.orig

# Node - Logs
*.log
npm-debug.log*

# Node - Dependencies
node_modules

# Temporary folder
/tmp
/dist

# OS - OSX
.DS_Store

# OS - Windows
Thumbs.db
ehthumbs.db

# OS - Linux (KDE directory preferences)
.directory

# Editor - VIM
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*~

# Editor - JetBrains
.idea/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.12.1
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# webpack-cli-repro-babel

> Minimal Webpack CLI 5 bug reproduction: https://github.com/webpack/webpack-cli/issues/3559
## Build

```sh
npm install && npm run build
```

Gives:

> SyntaxError: Unexpected token 'export'
Note that when replacing Webpack CLI version in `package.json`:

```diff
- "webpack-cli": "^5.0.1"
+ "webpack-cli": "^4.10.0"
```

And re-installing, the build works fine!
12 changes: 12 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const presetEnv = require("@babel/preset-env");

// Note that this Babel config is only aimed to be used in a Node.js execution context
// Webpack has its own Babel configuration (targeting browsers)
module.exports = function (api) {
api.cache(true);
return {
browserslistConfigFile : false,
targets : { node: "current" },
presets : [presetEnv]
};
};

0 comments on commit 50341f5

Please sign in to comment.