1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
Commit graph

27 commits

Author SHA1 Message Date
Tim Neutkens b1c4f3aec4
Monorepo (#5341)
- Implements Lerna
- Moves all source code into `packages/next`
- Keeps integration tests in the root directory
2018-10-01 01:02:10 +02:00
Tim Neutkens 2f618581cf Remove disabled plugin 2018-09-29 07:53:08 +02:00
Tim Neutkens 42736c061a
Introduce dynamic(() => import()) (#5249)
* Add failing tests

* Upgrade wd module

* Pass dynamic import webpack ids to the client side

* Pass through webpack ids to initalializer and only use those

* Compile dynamic(import()) to dynamic(() => import())

* Default dynamicIds

* Use forked hard-source-plugin

* Possibly fix test

* Make tests fail less intermittently

* Temporarily disable hard-source in production

* Make sure dynamic import chunks are unique

* Disable hard-source

* Log html if error is thrown

* Fix test
2018-09-25 15:27:09 +02:00
Henrik Wenz 7ebcc5bec9 Eliminate context code based on process.browser (#5159)
* Allow deadCodeElemination when using process.browser

* Add process.browser test
2018-09-23 16:02:28 +02:00
Tim Neutkens 10a9178e32
Make sure react always ends up in the commons bundle (#5192)
Fixes an edge case where some library imports react-dom by itself, like react-spring.
2018-09-17 15:57:28 +02:00
Tim Neutkens b475e619b9
Implement hard-source-webpack-plugin (#5181)
Follow-up of #5176

Closes #5173 as it led to inconsistencies in DX.
2018-09-16 17:02:32 +02:00
Henrik Wenz 34cb05a860 Remove obsolete webpack plugins (#5158)
Since we are now using webpacks `mode` flag we can get rid of:

* `webpack.optimize.ModuleConcatenationPlugin`
* `webpack.DefinePlugin` (`process.env.NODE_ENV`)

https://webpack.js.org/concepts/mode/
2018-09-14 15:45:48 +02:00
Tim Neutkens 695f372da9
Compile away next/link proptypes in production (#5155)
This saves 7KB as prop-types-exact is not needed in production.
2018-09-14 11:34:08 +02:00
Tim Neutkens d21603707e
Set cwd on babel-loader (#5127)
Fixes #5125

I'm not sure if this is a bug in babel-loader / babel-core or not. But this will at least temporary fix it till I hear back from @loganfsmyth 🙏
2018-09-09 01:10:47 +02:00
Tim Neutkens 673378e415
Use DefinePlugin to pass distDir instead of manually passing (#5105) 2018-09-05 17:49:49 +02:00
Tim Neutkens d6c7050816
Remove module.exports from client bundles (#5093)
Removes `module.exports` so that `module` is no longer required

Ref: https://github.com/zeit/next.js/pull/4943#discussion_r213232263

This saves 15 bytes from every client bundle + 9 bytes from the initial HTML.
2018-09-04 17:30:01 +02:00
Tim Neutkens 1cdc25ff79
Use terser for minification (#5083)
Fixes #5021
2018-09-03 20:59:11 +02:00
Bertrand Marron 2eeebacb4c Keep chunks filenames in production mode (#5029)
* Keep chunks filenames in production mode

* Add test for new `[name]` behavior

* Rename static/dll to static/development/dll
2018-09-03 01:40:21 +02:00
Tim Neutkens 18a23b3e4b
Set mode for DLL bundle (#5059) 2018-08-30 12:27:22 +02:00
Tim Neutkens e4a1e3746b
Use same extensions webpack supports, with addition of .jsx (#4960) 2018-08-24 10:29:51 +02:00
Tim Neutkens 1fe1f7fc49
Implement autodllplugin (#4951)
* Implement autodllplugin

* Add flow-typed for autodll-webpack-plugin
2018-08-13 15:09:05 -07:00
Sayuti Daniel 919b88509c Let webpack handle contenthash (#4895) 2018-08-04 11:18:20 -07:00
Sayuti Daniel bd3f65b37f Use contenthash instead of chunkhash (#4894)
https://github.com/webpack/webpack.js.org/issues/2096
2018-08-04 10:00:13 -07:00
Tim Neutkens 183866a96d
Add support for rendering .css chunks (#4861)
Depends on https://github.com/zeit/next-plugins/pull/228

Failing tests are expected as `@zeit/next-css` has to be updated/released first.

This implements rendering of `.css` chunks. Effectively removing the custom document requirement when adding next-css/sass/less/stylus.
2018-07-30 15:48:02 +02:00
Tim Neutkens 6a087c6a5d
Rename commons directory to runtime (#4853) 2018-07-27 19:29:25 +02:00
Tim Neutkens 475b426ed1
Compile pages to .next/static directory (#4828)
* Compile pages to .next/static/<buildid>/pages/<page>

* Fix test

* Export class instead of using exports

* Use constant for static directory

* Add comment about what the middleware does
2018-07-25 13:45:42 +02:00
Tim Neutkens 75476a9136
[WIP] Webpack 4, react-error-overlay, react-loadable (#4639)
Webpack 4, react-error-overlay, react-loadable (major)
2018-07-24 11:24:40 +02:00
Tim Neutkens 17e410a1d0
Fix Typescript HMR (#4689)
Fixes #4686

Adds tests for @zeit/next-typescript so that we don't regress on this again.

I've fixed an issue in the `next` CLI too which caused lingering processes when the process gets force killed, which is what we do in the test suite, so it kept running if there was no manual quit.
2018-06-28 20:07:41 +02:00
Andrew Cherniavskii 54ab3bc5be Fix code splitting on Windows (#4685)
Closes #4684
2018-06-28 15:19:39 +02:00
Tim Neutkens d674dcc426
Move plugins and loaders to webpack folder (#4618)
Also adds basic `flow` to webpack.js and the plugins.
2018-06-16 19:23:02 +02:00
Tim Neutkens c3866649c4
Apply hot-self-accept to all pageExtensions (#4616)
This makes sure plugins like @zeit/next-typescript or @zeit/next-mdx don't have to provide the `hot-self-accept-loader`.
This fixes for example @zeit/next-mdx, which doesn't implement `pageExtensions` but we do use mdx as top level pages for https://github.com/zeit/docs
2018-06-16 15:51:00 +02:00
Tim Neutkens f2c2519159
Move build directory outside of server folder (#4565)
The prepares for next-server.

I also took this as an opportunity to get all build directory paths from a single location, as they were previously scattered across webpack/babel plugins and loaders.
2018-06-14 19:30:14 +02:00
Renamed from server/build/webpack.js (Browse further)