Commit graph

13 commits

Author SHA1 Message Date
Michael "Z" Goddard
b7e7d6d9b9
chore(package): expose src/index as browser entry point
Downstream webpack will need any dependencies src/ depends on so it can
successfully build. Also if multiple packages being built into a larger
script share a common dependency version range, they can share the
dependency instead of duplicating it. This will save built file size,
execution time, and memory.
2018-05-09 10:07:02 -04:00
Ray Schamp
2af9ec2542
Merge pull request from mzgoddard/babel-preset-env
chore(build): replace babel-preset-es2015 with babel-preset-env
2018-05-08 16:51:01 -04:00
Michael "Z" Goddard
6ecbde5a2c
chore(build): replace babel-preset-es2015 with babel-preset-env 2018-05-07 13:35:38 -04:00
Michael "Z" Goddard
a0ab19326b
chore(build): update to webpack 4 2018-05-07 13:33:18 -04:00
Christopher Willis-Ford
c1f66ce132 Don't use separate web entry point: let UMD do it
Using UMD for the web build conflicts with the old `index-web.js` file,
since they both try to do roughly the same thing. This change should
have been part of the recent switch to UMD output for `dist/web`.
2017-09-26 00:39:03 -04:00
Christopher Willis-Ford
07841c0496 Use UMD for browser output; add "browser" field
Using UMD makes the build output more flexible and adds a very small
amount of overhead.
The "browser" field is one of the key features we've been missing and
should solve many of our build frustrations. See here for details on the
"browser" field in `project.json`:
https://github.com/defunctzombie/package-browser-field-spec
2017-09-13 11:31:33 -07:00
Geng Shenghong
6fc4832f97 replace 'got' with 'nets' and fix the 'web+commonjs2' and 'node+commonjs2' targets in webpack.config.js 2017-09-08 15:08:26 +08:00
Christopher Willis-Ford
6d9b746597 Standardize repository settings
Set dev tool to `cheap-module-source-map`.
2017-04-11 11:38:42 -04:00
Christopher Willis-Ford
0bb5f2f30f Upgrade to Webpack 2 2017-02-03 12:40:44 -08:00
Christopher Willis-Ford
2b28f27049 Add tests, fix problems found by those tests
Changes include:
- Use `bin-loader` instead of `arraybuffer-loader` since the latter is
  only compatible with browsers, not with Node itself.
- Use `got` instead of `xhr` since `xhr` only works in browsers and
  `got` is nicer anyway.
- Add `json-loader` to Webpack config since `got` requires it.
- Use lower-case values in `DataFormat` to match canonical file names.
- Update `ScratchStorage.addWebSource` to match `WebHelper`'s new API.
- Fix an error in the web helper which was causing an infinite loop on
  error.
2016-12-08 16:45:56 -08:00
Christopher Willis-Ford
5401c5e17f Configuration updates
Update eslint-config-scratch to 3.1.0
Explicitly specify target for Webpack outputs
2016-12-06 16:23:11 -08:00
Christopher Willis-Ford
e6ba286530 First-pass implementation of the load API
This implementation is untested and not complete, but should be
sufficient for discussion.
2016-11-08 16:08:55 -08:00
Christopher Willis-Ford
8184fb9b14 Initial structure 2016-10-21 18:27:47 -07:00