Commit Graph

72 Commits

Author SHA1 Message Date
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
6644054fc3 provide empty mock for child_process so importing libraries with it works (#3033) 2017-09-02 13:41:40 -07: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
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
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
Evan Jones
6ab0ec0075 Better React Native Web support (#2511)
* Better React Native Web support

* Adding better react-native-web support for jest testing
2017-06-28 15:29:58 +01:00
Dan Abramov
91064a1c7f Ignore "Skipping static resource" message from SW precache (#2645) 2017-06-27 22:28:00 +01:00
Daniel Ciao
a9ac78996b Fix sourcemap directory organizing on Windows (#2456) (#2610)
* Fix sourcemap directory organizing on Windows

* Update comments
2017-06-27 16:55:28 +01:00
Ade Viankakrisna Fadlil
41f2013260 turn on ascii_only for issue with emoji and regex (#2596) 2017-06-27 14:05:15 +01:00
Dan Abramov
7a0fb4c62b Use Babel compact mode in production (#2389) 2017-06-26 17:35:18 +01:00
Andy Kenward
43d0307bc1 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-06-26 17:31:25 +01:00
Will Farley
3e9955ddb6 Update sw-precache-webpack-plugin to lastest version (#2429)
* Update sw-precache-webpack-plugin to v0.11.3

* Pin the version
2017-06-26 17:29:52 +01:00
Mico Piira
6e2898e596 Add empty mock for dgram (#2600) 2017-06-26 16:48:21 +01:00
David Ascher
f6d8544033 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-05-27 12:36:42 +01:00
Zac Kwan
c1ba38dbf5 Removed the overriding of reduce_vars to false since webpack v2.6.0 included the fixed for Uglify bug (#2351) 2017-05-27 12:33:13 +01:00
Ryan Sullivan
55fe1369d7 Add navigateFallbackWhitelist /__* to SW Precache config (#2347)
* Add navigateFallbackWhitelist /__* to SW Precache config

* Add comments
2017-05-24 13:07:45 +01:00
Dan Abramov
3a3be7478b Fix a bug on empty NODE_PATH (#2264) 2017-05-19 20:06:15 +01:00
Dan Abramov
d24311ea79 Always resolve NODE_PATH (#2261)
* Always resolve NODE_PATH

* Update env.js
2017-05-19 19:55:57 +01:00
Dan Abramov
3cd2267256 Additional fix to service worker config for "homepage" field (#2262) 2017-05-19 19:41:59 +01:00
Dan Abramov
22ca584b2b Work around Windows path issue in SWPrecacheWebpackPlugin (#2255) 2017-05-19 17:57:58 +01:00
Dan Abramov
fd2a800f76 Disable Uglify reduce_vars (#2200) 2017-05-17 23:24:07 +01:00
Dan Abramov
d9a2974574 Tidy up some build logs (#2197) 2017-05-17 20:10:17 +01:00
Jeffrey Posnick
c7c3a521e2 PWA-ification, via SWPrecacheWebpackPlugin + manifest.json (#1728)
* sw-precache-webpack-plugin, SW registration, manifest.json

* Documentation + a few SW tweaks.

* Added an unregister method, too, just in case.

* More info for the READMEs.

* Add minify to SWPrecacheWebpackPlugin config

* Fix SWPrecacheWebpackPlugin typo

* Fix file references in READMEmd

* Add instructions for testing service-worker locally

* Review feedback

* Some additional PWA metadata

* Use sw-precache-webpack-plugin v0.9.1 for node >=4.0.0 support

* Review feedback.

* Add manifest.json context in a comment.

* Fix typo

* Downgrade to sw-precache-webpack-plugin 0.9.1

* Hide changes in README until 1.0

* Hide changes in User Guide until 1.0

* Hide more docs
2017-05-17 19:28:27 +01:00
Kant
e7c113eb15 Webpack config typo (#2193)
* Webpack config typo

* Webpack config more typo
2017-05-17 14:30:07 +01:00
Joe Haddad
a61be9c619 Add module scope plugin (#2189)
* Add module scope plugin

* Oops

* Add comments

* Check windows seps too

* More descriptive error

* Document it
2017-05-17 12:19:52 +01:00
Dan Abramov
65ff5481d9 Ignore Moment.js locales by default (#2187)
* Ignore Moment.js locales by default

* Update README.md
2017-05-16 23:59:48 +01:00
Dan Abramov
134d2297dd Reenable require.ensure() 2017-05-16 16:10:10 +01:00
Dan Abramov
50aaae6c1c Resolve regenerator runtime relative to react-scripts (#2175) 2017-05-16 15:40:16 +01:00
Cristian
044e57b726 Adding plugin postcss-flexbugs-fixes and flexbox: 'no-2009' to Autoprefixer (#1771)
* Adding postcss-flexbugs-fixes

Using postcss-flexbugs-fixes to fix all flexbug's issues.

* Adding flexbox: 'no-2009' to Autoprefixer

It will add flexbox prefixes only for final and IE versions of
specification.
2017-05-16 01:02:38 +01:00
Dan Abramov
9b231d461d Enable CSS sourcemaps in production (#2168) 2017-05-16 00:52:39 +01:00
Dan Abramov
d6dbfc0353 Support hoisting react-scripts and add require.resolve() to loaders (#2166)
* Support hoisting react-scripts

* require.resolve() loaders and configs

This makes it so that loaders and configs are resolved relative to the config rather than to the app. This seems to make more sense to me.
2017-05-15 23:47:28 +01:00
Siddharth Doshi
f17448e9e5 Add custom eslint formatter (#2138)
* Add custom eslint formatter

* Add formatter docs

* Update formatter docs

* Slightly tweak it

* Update README.md
2017-05-15 00:42:13 +01:00
Joe Haddad
88f4f95ae8 Upgrade webpack deps and use strictExportPresence (#2028) 2017-04-25 10:36:18 +01:00
Joe Haddad
927c539bc5 Use custom sourcemap file names 2017-04-24 21:51:59 -04:00
Joe Haddad
5bb502a28f Turn off CSS source maps 2017-04-24 14:54:37 -04:00
Ade Viankakrisna Fadlil
d6173fd2a4 Minify and map css (#2013)
Minify and map css
2017-04-21 21:15:58 -04:00
Marco Fugaro
31a38b34c4 removed options in UglifyJsPlugin which are equal to the defaults (#1993)
* removed redundant already default options in UglifyJsPlugin

* re-enabled remove comments Uglify option

JSDoc-style comments weren't being removed
2017-04-19 11:40:42 +01:00
Asa Ayers
47a8148fb1 Fix importing npm linked libraries (#1359)
* Fix importing npm linked libraries

* Update webpack.config.dev.js

* Update webpack.config.prod.js
2017-03-22 20:29:53 -04:00
Dan Abramov
ccb5f84dc6 Fixes a silent crash when ejecting (#1810)
* Fixes a silent crash when ejecting

* Delete unnecessary files

* Remove references to eslintrc in Webpack config

* Fix lint

* Correct ESLint CLI options
2017-03-14 11:17:53 -04:00
Valerii Sorokobatko
fe7b5c212b update to modern code style (#1738)
* mv create-react-app/index.js -> create-react-app/creteReactApp.js

* update to modern code style

* var -> cosnt

* set trailing-coma to es5 for prettier
2017-03-07 19:46:10 +00:00
Rory Hunter
2ac1b38ec6 Whitelist files that can be embedded through url-loader (#1305)
* Whitelist files that can be embedded through url-loader

Change the current catch-all loader to use file-loader instead of
url-loader, and exclude common image file extensons. Add another url-loader
for images, configured identically to the original catch-all loader.

Part of issue #1293.

* Update tests to reflect change in loader config

* Integration test fix

* More CI fixes

* Work around broken loader-utils behaviour in integration tests

* Revise the documentation around file loading

* Documentation tweaks

* Docs tweak

* Update test now that webpack/loader-utils has been updated

* Update react-scripts to depend on babel-loader@7.0.0-alpha.2

* Bump deps
2017-03-07 01:24:56 -05:00
Dan Abramov
1bfd5dafdf Fix internal linting setup and add missing headers (#1741) 2017-03-06 14:20:29 +00:00
pd4d10
72695a1c7c Remove unneeded url lib (#1715)
Remove unused `url` import in Webpack config
2017-03-04 13:31:12 +00:00
Joe Haddad
fc49946ccb Add support for dynamic import & disable require.ensure (#1538)
* Disable require.ensure

* Replace require.ensure with import

* Add babel plugin for parsing import()

* Get the default

* Upgrade babel-eslint to support dynamic import

* Fix dep

* Update deps
2017-02-14 20:51:23 -05:00
Joe Haddad
12288836e1 Upgrade webpack (#1291)
* Upgrade webpack

* Address more webpack v2 ...

* Update html-webpack-plugin

* Remove LoaderOptionsPlugin from dev config

* ExtractTextPlugin still uses webpack 1 syntax
... and doesn't support complex options (yet)

* Grammar nit

* Update extract text webpack plugin

* - Remove webpack.LoaderOptionsPlugin
- Update deps

* Lerna hoists packages

* Update extract-text-webpack-plugin

* Update webpack-dev-server

* Remove imports for the tests

* stop removing babelrc
2017-02-11 14:11:00 -05:00
Thibault Derousseaux
8e127aaa38 Support relative asset paths for special case (#1489)
* Fix paths in CSS files when homepage is set to "./"

In the production build, ExtractTextPlugin is used to generate a separate CSS file instead of injecting style through JavaScript. This plugin does not work well by default with nested output structure. To fix it, we give it a relative publicPath pointing to the build folder.

* Add section in README to explain how to make builds deployable anywhere

* Apply review requested change

* Apply review changes 2
2017-02-10 00:44:00 -05:00
Joe Haddad
613b584f42 Add PUBLIC_URL env variable for advanced use (#937) (#1504)
* Add `PUBLIC_URL` env variable for advanced use (#937)
* Add support for `PUBLIC_URL` env variable
* Remove unnecessary duplications
* Simplify served path choice logic
* Honor PUBLIC_URL in development
* Add e2e tests

Enables serving static assets from specified host.
2017-02-09 23:15:15 -05:00