Commit Graph

176 Commits

Author SHA1 Message Date
Dominik Broj
39d6c62788 Uglifyjs update for es6 support (#249)
* feat(react-scripts/prod): use new uglifyJsPlugin for ES6 support

this closes #21, #158, #248

* feat(react-scripts/prod): execute uglify plugin parallel + enable caching
2018-02-19 08:06:04 +01:00
Gustav Wengel
ec0a39e080 Added the abillity to import js and jsx files with ts-loader (#242)
* added js and jsx to things that ts-loader loads

* removed spaces and made prettier runnable on windows

* run jsx specs too

* added isejecting

* added dependencies and babeltransform

* bumped jest version#

* does it work without cache?

* cache?

* added ts

* updates ts-jest

* readd caching

* removed ts as a devdependency

* added babel to handle js files

* added prod env

* prod is handled by babel loader

* added ts as devdep

* cache node modules

* fixed legal
2018-02-13 10:00:43 +01:00
DorianGrey
b40c8c56d4 Remove tslint-loader from prod build (again) 2018-01-22 15:28:19 +01:00
Christian Linne
6b946390c2 Merge pull request #223 from diabelb/master
Fixed problem with tsconfig.json baseUrl and paths
2018-01-15 08:46:25 +01:00
dawidboruta
d5b370d8ab Fixed problem with tsconfig.json baseUrl and paths 2018-01-13 19:30:58 +01:00
William Monk
6f0c62f43c Fix 2018-01-11 09:26:49 +00:00
William Monk
1061fdef87 Merge facebookincubator/create-react-app@1.0.17 2018-01-11 09:00:42 +00:00
Will Monk
9e4589f48e Merge pull request #165 from johnnyreilly/master
Add support for fork-ts-checker-webpack-plugin
2018-01-11 08:31:36 +00:00
Dan Abramov
5811d55f70 Use new WebpackDevServer option (#3401) 2017-11-03 18:18:57 +00:00
Nik Nyby
70e0c08ef7 Remove output.path from dev webpack config (#3158)
According to this parameter's comment, it's unused but webpack-dev-server crashes without it. However, webpack-dev-server is running fine for me without this parameter.
2017-10-28 21:58:09 +01:00
Joe Haddad
5c8000f300 Add .mjs support (#3239) 2017-10-28 21:48:42 +01:00
Satya van Heummen
1fa16ace5f Make uglify work in Safari 10.0 - fixes #3280 (#3281)
Implement settings as suggested here:
https://github.com/mishoo/UglifyJS2/tree/harmony#mangle-options

To solve this Safari bug:
https://bugs.webkit.org/show_bug.cgi?id=171041
2017-10-28 21:42:41 +01:00
Dan Abramov
fe4dc744d7 Polyfill rAF in test environment (#3340) 2017-10-28 17:57:27 +01:00
Jonny Buchanan
a0030fcf2d Update style-loader and disable inclusion of its HMR code in builds (#3236) 2017-10-05 20:02:32 -04:00
Joe Haddad
01a0d737c7 Fix Windows compatibility (#3232)
* Windows compatibility

* Use regex for mutli-replace
2017-10-02 23:45:20 -04:00
Joe Lim
1e98d0f428 Watch for changes in src/**/node_modules (#3230)
* Allow the dev server to watch for changes in src/node_modules

* fix eslint error

* fix broken regex

* handle trailing slash edge case for file paths

Closes #2760
Fixes #3223
2017-10-02 22:57:02 -04:00
Sophie Alpert
2e82ebb337 BSD+Patents -> MIT (#3189)
* File headers BSD+Patents -> MIT

* BSD+Patents -> MIT
2017-09-26 10:30:05 +01:00
Kristie Howard
b67ef01ade Update unclear wording in webpack config docs (#3160) 2017-09-19 22:00:44 -04:00
Anthony
c4651dcbe3 provide empty mock for child_process so importing libraries with it works (#3033) 2017-09-09 22:35:24 +02:00
Tharaka Wijebandara
912a02ece0 Fix error overlay 'Object.assign' issue in IE by including polyfills before webpack client (#3046) 2017-09-09 22:35:23 +02:00
Tharaka Wijebandara
caa9cef27a Convert react-error-overlay to React (#2515)
* Convert react-error-overlay to React

* Update compile-time error overlay to use react-error-overlay components

 * Refactor react-error-overlay components to container and presentational components.

 * Make the compile-time error overlay a part of react-error-overlay package.

 * Use react-error-overlay as dependency in react-dev-utils to show compile-time errors.

* Run Prettier

* Move the function name fix into StackFrame itself

* Fix clicking on source code snippet to open the code in editor

* Use exact objects + minor style tweak

* Don't linkify frames that don't exist on the disk

* Fix lint

* Consolidate iframe rendering logic

* Remove circular dependency between react-dev-utils and react-error-overlay

* Fix lint

* Fix decoupling of react-dev-utils and react-error-overlay by moving middleware

* Deduplicate identical errors
2017-09-09 22:34:19 +02:00
Ade Viankakrisna Fadlil
2ff3a19364 Use env variable to disable source maps (#2818)
* use env variable to disable source maps

* Rename to use SOURCE_MAP with explicit value

* Update webpack.config.prod.js
2017-09-09 22:25:58 +02:00
iamdoron
9b7901241f Allow importing package.json (#2468)
* Allow importing package.json

* Remove package.json import from App.js template

* fix importing package.json

* Rename variable to reflect path is relative to root

* Check for both package & package.json in ModuleScopePlugin

* Use regex to check relative path to package.json

* Strictly enforce package.json extension on scope plugin

* Add allowedPaths to ModuleScopePlugin ctor and use it to allow app package.json

* Remove package.json import from App.js template

* Add package.json to react-scripts/template, show package version and name in the template

* Remove import package.json from template

* Remove template/package.json and its references in code

* Update ModuleScopePlugin.js

* Update README.md
2017-09-09 22:25:57 +02:00
Andreas Hoffmann
e0c2729b0d Use Rule.oneOf to resolve correct loader (#2747)
* Use oneOf to resolve correct loader

* Add html and json fallthrough again

* Use oneOf to resolve correct loader in dev

* Document file-loaders `js` exclusion

* Remove `jsx` from exclusion in prod config
2017-09-09 22:25:19 +02:00
Đinh Quang Trung
63e8924f99 ESLint 4 (#2735)
* Update eslint-loader 1.7.1 -> 1.9.0

* Add eslintPath option

* Update eslint 3.19.0 -> 4.1.1

* Update peer dependencies

* Move eslintPath config to outside @remove-on-eject
2017-09-09 22:25:19 +02:00
Anthony
6644054fc3 provide empty mock for child_process so importing libraries with it works (#3033) 2017-09-02 13:41:40 -07:00
Tharaka Wijebandara
1df16109c9 Fix error overlay 'Object.assign' issue in IE by including polyfills before webpack client (#3046) 2017-09-01 12:54:58 -07:00
Tharaka Wijebandara
ecd1f0544b Convert react-error-overlay to React (#2515)
* Convert react-error-overlay to React

* Update compile-time error overlay to use react-error-overlay components

 * Refactor react-error-overlay components to container and presentational components.

 * Make the compile-time error overlay a part of react-error-overlay package.

 * Use react-error-overlay as dependency in react-dev-utils to show compile-time errors.

* Run Prettier

* Move the function name fix into StackFrame itself

* Fix clicking on source code snippet to open the code in editor

* Use exact objects + minor style tweak

* Don't linkify frames that don't exist on the disk

* Fix lint

* Consolidate iframe rendering logic

* Remove circular dependency between react-dev-utils and react-error-overlay

* Fix lint

* Fix decoupling of react-dev-utils and react-error-overlay by moving middleware

* Deduplicate identical errors
2017-08-27 19:45:55 -06:00
Ade Viankakrisna Fadlil
1e3a64fa43 Use env variable to disable source maps (#2818)
* use env variable to disable source maps

* Rename to use SOURCE_MAP with explicit value

* Update webpack.config.prod.js
2017-08-08 21:53:37 -04:00
William Monk
7014aeddda Fix Code Review 2017-08-07 16:20:05 +02:00
Dan Abramov
761fe6f2a7 Fix external CSS imports (#2680)
* Fix external CSS imports

* Add external CSS import to integration test

* Fix assertion
2017-08-07 16:17:29 +02:00
Dan Abramov
10bd98cbe5 Reformat source code with Prettier 1.5.2 2017-08-07 16:16:16 +02:00
Evan Jones
e8e2926e87 Better React Native Web support (#2511)
* Better React Native Web support

* Adding better react-native-web support for jest testing
2017-08-07 16:16:16 +02:00
Dan Abramov
4e3e06bf6c Ignore "Skipping static resource" message from SW precache (#2645) 2017-08-07 16:10:27 +02:00
Daniel Ciao
03039aa3a4 Fix sourcemap directory organizing on Windows (#2456) (#2610)
* Fix sourcemap directory organizing on Windows

* Update comments
2017-08-07 16:05:30 +02:00
Ade Viankakrisna Fadlil
6d42a3c049 turn on ascii_only for issue with emoji and regex (#2596) 2017-08-07 16:05:30 +02:00
Dan Abramov
d69e4419ee Use Babel compact mode in production (#2389) 2017-08-07 16:05:30 +02:00
Andy Kenward
e12710bb5f webpack no need for ident if using complex options anymore (#2430)
Since `v2.2.1` of webpack the need for `ident` for complex options is no longer required. See

https://webpack.js.org/guides/migrating/#complex-options
2017-08-07 16:03:41 +02:00
Will Farley
3d6ebe71d6 Update sw-precache-webpack-plugin to lastest version (#2429)
* Update sw-precache-webpack-plugin to v0.11.3

* Pin the version
2017-08-07 16:03:40 +02:00
Mico Piira
ec0f811501 Add empty mock for dgram (#2600) 2017-08-07 16:02:40 +02:00
Zac Kwan
e9f1371023 Added NamedModulesPlugin in webpack.config.dev.js (#2458)
* Added NamedModulesPlugin in webpack.config.dev.js

* Update webpack.config.dev.js
2017-08-07 16:00:47 +02:00
David Ascher
9114aea7ac Disable comparisons feature in uglify compression in production (#2379)
* Disable a micro-option in uglify that appears to be buggy

See https://github.com/facebookincubator/create-react-app/issues/2376

* wrong plugin

* Add a comment
2017-08-07 15:59:41 +02:00
Zac Kwan
bfeb950404 Removed the overriding of reduce_vars to false since webpack v2.6.0 included the fixed for Uglify bug (#2351) 2017-08-07 15:59:41 +02:00
iamdoron
24b18aedd9 Allow importing package.json (#2468)
* Allow importing package.json

* Remove package.json import from App.js template

* fix importing package.json

* Rename variable to reflect path is relative to root

* Check for both package & package.json in ModuleScopePlugin

* Use regex to check relative path to package.json

* Strictly enforce package.json extension on scope plugin

* Add allowedPaths to ModuleScopePlugin ctor and use it to allow app package.json

* Remove package.json import from App.js template

* Add package.json to react-scripts/template, show package version and name in the template

* Remove import package.json from template

* Remove template/package.json and its references in code

* Update ModuleScopePlugin.js

* Update README.md
2017-08-01 22:50:58 -04:00
nicolaserny
e1224ed94b Add tsconfig.test.json (instead of using deprecated TS_CONFIG) 2017-07-25 09:24:44 +02:00
DorianGrey
6fa3b6ae49 Use ts-jest instead of custom solution for transforming ts files. 2017-07-13 08:21:20 +02:00
Andreas Hoffmann
a08eb3b44b Use Rule.oneOf to resolve correct loader (#2747)
* Use oneOf to resolve correct loader

* Add html and json fallthrough again

* Use oneOf to resolve correct loader in dev

* Document file-loaders `js` exclusion

* Remove `jsx` from exclusion in prod config
2017-07-09 21:59:19 +01:00
Đinh Quang Trung
bbbc15dc8e ESLint 4 (#2735)
* Update eslint-loader 1.7.1 -> 1.9.0

* Add eslintPath option

* Update eslint 3.19.0 -> 4.1.1

* Update peer dependencies

* Move eslintPath config to outside @remove-on-eject
2017-07-07 11:40:29 +01:00
Dan Abramov
567d981ee2 Fix external CSS imports (#2680)
* Fix external CSS imports

* Add external CSS import to integration test

* Fix assertion
2017-06-29 12:59:49 +01:00
Dan Abramov
a171d93064 Reformat source code with Prettier 1.5.2 2017-06-28 16:23:16 +01:00