Merge pull request #642 from netlify/bundle-size
Make YAML and TOML parsers' bundle smaller
This commit is contained in:
commit
9ef35c71f1
@ -157,7 +157,7 @@
|
|||||||
"slate-edit-table": "^0.10.1",
|
"slate-edit-table": "^0.10.1",
|
||||||
"slate-soft-break": "^0.3.0",
|
"slate-soft-break": "^0.3.0",
|
||||||
"slug": "^0.9.1",
|
"slug": "^0.9.1",
|
||||||
"toml": "^2.3.3",
|
"toml-j0.4": "^1.1.1",
|
||||||
"unified": "^6.1.4",
|
"unified": "^6.1.4",
|
||||||
"unist-builder": "^1.0.2",
|
"unist-builder": "^1.0.2",
|
||||||
"unist-util-visit-parents": "^1.1.1",
|
"unist-util-visit-parents": "^1.1.1",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import matter from 'gray-matter';
|
import matter from 'gray-matter';
|
||||||
import tomlEng from 'toml';
|
import tomlEng from 'toml-j0.4';
|
||||||
import YAML from './yaml';
|
import YAML from './yaml';
|
||||||
|
|
||||||
const parsers = {
|
const parsers = {
|
||||||
|
@ -61,6 +61,7 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
new webpack.IgnorePlugin(/^esprima$/, /js-yaml/), // Ignore Esprima import for js-yaml
|
||||||
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), // Ignore all optional deps of moment.js
|
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), // Ignore all optional deps of moment.js
|
||||||
new webpack.ProvidePlugin({
|
new webpack.ProvidePlugin({
|
||||||
fetch: 'imports-loader?this=>global!exports-loader?global.fetch!whatwg-fetch',
|
fetch: 'imports-loader?this=>global!exports-loader?global.fetch!whatwg-fetch',
|
||||||
|
@ -8637,9 +8637,9 @@ to-fast-properties@^1.0.3:
|
|||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47"
|
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47"
|
||||||
|
|
||||||
toml@^2.3.3:
|
toml-j0.4@^1.1.1:
|
||||||
version "2.3.3"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/toml/-/toml-2.3.3.tgz#8d683d729577cb286231dfc7a8affe58d31728fb"
|
resolved "https://registry.yarnpkg.com/toml-j0.4/-/toml-j0.4-1.1.1.tgz#eb0c70348609a0263bb1d6e4a3dd191dcca60866"
|
||||||
|
|
||||||
topbar@^0.1.3:
|
topbar@^0.1.3:
|
||||||
version "0.1.3"
|
version "0.1.3"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user