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

Update RefreshSetupRuntime #306

Merged
merged 4 commits into from
Feb 28, 2021
Merged

Update RefreshSetupRuntime #306

merged 4 commits into from
Feb 28, 2021

Conversation

BSthun
Copy link
Contributor

@BSthun BSthun commented Feb 7, 2021

Comment

Add more path replacement condition for making supoort with path that contains ' (Apostrophe symbol) e.g. (/Volume/Thun's Disk/React-project-01).

Issue

When I use React.js with project path with ' symbol, will will error due to incomplete ' pair like this:

Failed to compile.

./src/index.js 1:42
Module parse failed: Unexpected token (1:42)
File was processed with these loaders:
 * ./node_modules/@pmmmwh/react-refresh-webpack-plugin/loader/index.js
 * ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
> $RefreshRuntime$ = require('/Volumes/Thun's APFS Dev A/University/CSC105-POS/storefront/node_modules/react-refresh/runtime.js');
| $RefreshSetup$(module.id);
|

So I replace every single ' symbol with \' for making them as a charactor in the path instead. This works for solving my issue.

Add more path replacement condition for making supoort with path that contains `'` (Apostrophe symbol) e.g. (/Volume/Thun's Disk/React-project-01)
loader/index.js Outdated Show resolved Hide resolved
BSthun and others added 2 commits February 8, 2021 09:02
Co-authored-by: Michael Mok <pmmmwh@gmail.com>
@BSthun BSthun closed this Feb 8, 2021
@BSthun BSthun reopened this Feb 8, 2021
loader/index.js Outdated Show resolved Hide resolved
@pmmmwh pmmmwh merged commit 3fa414a into pmmmwh:main Feb 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants