Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
imhazige committed Jun 13, 2018
1 parent b6c426f commit caad277
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ fetch(url)

### Unit Test
run `yarn run test` will run all the test script with file extension `.test.js`
run `yarn run test <path-to-xxx.test.js>` will run the one test script

###$ API Test
see <./test/api/t1.test.js> as a example
Expand Down Expand Up @@ -164,6 +165,17 @@ example:
}
```

### can not use variable for require function
it require to use defined string when invoke require, also `__dirname` will be the build folder instead, do not rely on it.
```javascript
const s = '../model'
var model = require(s).default; //error
var model = require('../model').default //correct
`
### Invalid Option: 'true' is not a valid value for 'targets.forceAllTransforms'
refer to the [issue](https://github.com/kriasoft/react-starter-kit/issues/1626)
Expand Down
2 changes: 1 addition & 1 deletion tools/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ const config = {
{
targets: {
browsers: pkg.browserslist,
forceAllTransforms: !isDebug, // for UglifyJS
},
forceAllTransforms: !isDebug, // for UglifyJS see https://github.com/kriasoft/react-starter-kit/issues/1626
modules: false,
useBuiltIns: false,
debug: false,
Expand Down

0 comments on commit caad277

Please sign in to comment.