Skip to content
New issue

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

feature/issue 153 import attributes syntax parsing #157

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
// need this custom parser configuration until ESLint natively supports import attributes
// https://github.com/eslint/eslint/discussions/15305#discussioncomment-2508948
module.exports = {
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
ecmaFeatures: {
jsx: true
},
requireConfigFile: false,
babelOptions: {
plugins: [
'@babel/plugin-syntax-import-assertions'
],
presets: ['@babel/preset-react']
}
},
env: {
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.12.1
18.20.0
6 changes: 3 additions & 3 deletions docs/pages/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,11 @@ A couple things to observe in the above example:
### Prerequisites

There are of couple things you will need to do to use WCC with JSX:
1. NodeJS version needs to be >= `16.x`
1. NodeJS version needs to be >= `18.20.0`
1. You will need to use the _.jsx_ extension
1. Requires the `--experimental-loaders` flag when invoking NodeJS
1. Requires the `--loader` flag when invoking NodeJS
```shell
$ node --experimental-loader ./node_modules/wc-compiler/src/jsx-loader.js server.js
$ node --loader ./node_modules/wc-compiler/src/jsx-loader.js server.js
```

> _See our [example's page](/examples#jsx) for some usages of WCC + JSX._ 👀
Expand Down
Loading
Loading