https://github.com/zenflow/preval-use-strict-bug
Reproduction repository for issue #47 in kentcdodds/babel-plugin-preval
https://github.com/zenflow/preval-use-strict-bug
Last synced: 9 months ago
JSON representation
Reproduction repository for issue #47 in kentcdodds/babel-plugin-preval
- Host: GitHub
- URL: https://github.com/zenflow/preval-use-strict-bug
- Owner: zenflow
- Created: 2018-01-25T07:50:08.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-25T09:06:20.000Z (over 8 years ago)
- Last Synced: 2025-04-07T13:21:52.593Z (about 1 year ago)
- Language: JavaScript
- Homepage: https://github.com/kentcdodds/babel-plugin-preval/issues/47
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# preval-use-strict-bug
Reproduction repository for [issue #47 in kentcdodds/babel-plugin-preval](https://github.com/kentcdodds/babel-plugin-preval/issues/47)
## Problem
"preval file comment" method has no effect on modules that use Strict Mode
For example, modules like the following will not be "prevaled", and there will be no error or warning:
```js
// @preval
'use strict';
// ...
```
## Reproduction
The files in the `dist` folder (committed for demonstration purposes) were generated from the `src` folder by running `npm run build`.
There are 3 examples, for 3 different preval usage methods. The only one that shows the problem is the `preval-file-comment` example.