Skip to content

Commit

Permalink
Updated snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
swernerx committed Aug 6, 2019
1 parent 4f36454 commit c3eb6f3
Show file tree
Hide file tree
Showing 17 changed files with 1,451 additions and 1,254 deletions.
2 changes: 1 addition & 1 deletion __tests__/__fixtures__/loadable-magic-comments.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import loadable from 'loadable-components'
import loadable from '@loadable/component'

export const Home = loadable(() => import(/* other comment */ './views/Home'))
export const About = loadable(() => import(/* webpackChunkName: "About" */ './views/About'))
Expand Down
2 changes: 1 addition & 1 deletion __tests__/__fixtures__/loadable-wildcard.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import loadable from 'loadable-components'
import loadable from '@loadable/component'

const page = "About"
const lang = "de_DE"
Expand Down
2 changes: 1 addition & 1 deletion __tests__/__fixtures__/loadable.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import loadable from 'loadable-components'
import loadable from '@loadable/component'

export const Home = loadable(() => import('./views/Home'))
export const About = loadable(() => import('./views/About'))
Expand Down
6 changes: 3 additions & 3 deletions __tests__/__snapshots__/target-browser-dev.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ exports[`Target: Browser: Dev esnext: object spread 1`] = `

exports[`Target: Browser: Dev loadable 1`] = `
"import \\"core-js/modules/es.promise\\";
import loadable from 'loadable-components';
import loadable from '@loadable/component';
export const Home = loadable({
chunkName() {
return \\"Home-JfPYC\\";
Expand Down Expand Up @@ -259,7 +259,7 @@ export const Contact = loadable({

exports[`Target: Browser: Dev loadable magic-comments 1`] = `
"import \\"core-js/modules/es.promise\\";
import loadable from 'loadable-components';
import loadable from '@loadable/component';
export const Home = loadable({
chunkName() {
return \\"Home-JfPYC\\";
Expand Down Expand Up @@ -373,7 +373,7 @@ export const Contact = loadable({
exports[`Target: Browser: Dev loadable wildcard 1`] = `
"import \\"core-js/modules/es.promise\\";
import \\"core-js/modules/es.string.replace\\";
import loadable from 'loadable-components';
import loadable from '@loadable/component';
const page = \\"About\\",
lang = \\"de_DE\\";
export const views = loadable({
Expand Down
6 changes: 3 additions & 3 deletions __tests__/__snapshots__/target-browser-prod.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ exports[`Target: Browser: Prod esnext: dynamic import 1`] = `"import\\"core-js/m

exports[`Target: Browser: Prod esnext: object spread 1`] = `"import\\"core-js/modules/es.object.assign\\";var original={bar:10},variant=Object.assign({foo:1},original);"`;

exports[`Target: Browser: Prod loadable 1`] = `"import\\"core-js/modules/es.object.to-string\\";import\\"core-js/modules/es.promise\\";import loadable from\\"loadable-components\\";export var Home=loadable({chunkName:function chunkName(){return\\"Home-JfPYC\\"},isReady:function isReady(){return\\"undefined\\"!=typeof __webpack_modules__&&!!__webpack_modules__[this.resolve(a)]},requireAsync:function requireAsync(){return import(/* webpackChunkName: \\"Home-JfPYC\\" */\\"./views/Home\\")},requireSync:function requireSync(props){var id=this.resolve(props);return\\"undefined\\"==typeof __webpack_require__?__webpack_require__(id):eval(\\"module.require\\")(id)},resolve:function resolve(){return require.resolveWeak?require.resolveWeak(\\"./views/Home\\"):eval(\\"require.resolve\\")(\\"./views/Home\\")}});export var About=loadable({chunkName:function chunkName(){return\\"About-8yDxR\\"},isReady:function isReady(){return\\"undefined\\"!=typeof __webpack_modules__&&!!__webpack_modules__[this.resolve(a)]},requireAsync:function requireAsync(){return import(/* webpackChunkName: \\"About-8yDxR\\" */\\"./views/About\\")},requireSync:function requireSync(props){var id=this.resolve(props);return\\"undefined\\"==typeof __webpack_require__?__webpack_require__(id):eval(\\"module.require\\")(id)},resolve:function resolve(){return require.resolveWeak?require.resolveWeak(\\"./views/About\\"):eval(\\"require.resolve\\")(\\"./views/About\\")}});export var Contact=loadable({chunkName:function chunkName(){return\\"Contact-AIf6m\\"},isReady:function isReady(){return\\"undefined\\"!=typeof __webpack_modules__&&!!__webpack_modules__[this.resolve(a)]},requireAsync:function requireAsync(){return import(/* webpackChunkName: \\"Contact-AIf6m\\" */\\"./views/Contact\\")},requireSync:function requireSync(props){var id=this.resolve(props);return\\"undefined\\"==typeof __webpack_require__?__webpack_require__(id):eval(\\"module.require\\")(id)},resolve:function resolve(){return require.resolveWeak?require.resolveWeak(\\"./views/Contact\\"):eval(\\"require.resolve\\")(\\"./views/Contact\\")}});"`;
exports[`Target: Browser: Prod loadable 1`] = `"import\\"core-js/modules/es.object.to-string\\";import\\"core-js/modules/es.promise\\";import loadable from\\"@loadable/component\\";export var Home=loadable({chunkName:function chunkName(){return\\"Home-JfPYC\\"},isReady:function isReady(){return\\"undefined\\"!=typeof __webpack_modules__&&!!__webpack_modules__[this.resolve(a)]},requireAsync:function requireAsync(){return import(/* webpackChunkName: \\"Home-JfPYC\\" */\\"./views/Home\\")},requireSync:function requireSync(props){var id=this.resolve(props);return\\"undefined\\"==typeof __webpack_require__?__webpack_require__(id):eval(\\"module.require\\")(id)},resolve:function resolve(){return require.resolveWeak?require.resolveWeak(\\"./views/Home\\"):eval(\\"require.resolve\\")(\\"./views/Home\\")}});export var About=loadable({chunkName:function chunkName(){return\\"About-8yDxR\\"},isReady:function isReady(){return\\"undefined\\"!=typeof __webpack_modules__&&!!__webpack_modules__[this.resolve(a)]},requireAsync:function requireAsync(){return import(/* webpackChunkName: \\"About-8yDxR\\" */\\"./views/About\\")},requireSync:function requireSync(props){var id=this.resolve(props);return\\"undefined\\"==typeof __webpack_require__?__webpack_require__(id):eval(\\"module.require\\")(id)},resolve:function resolve(){return require.resolveWeak?require.resolveWeak(\\"./views/About\\"):eval(\\"require.resolve\\")(\\"./views/About\\")}});export var Contact=loadable({chunkName:function chunkName(){return\\"Contact-AIf6m\\"},isReady:function isReady(){return\\"undefined\\"!=typeof __webpack_modules__&&!!__webpack_modules__[this.resolve(a)]},requireAsync:function requireAsync(){return import(/* webpackChunkName: \\"Contact-AIf6m\\" */\\"./views/Contact\\")},requireSync:function requireSync(props){var id=this.resolve(props);return\\"undefined\\"==typeof __webpack_require__?__webpack_require__(id):eval(\\"module.require\\")(id)},resolve:function resolve(){return require.resolveWeak?require.resolveWeak(\\"./views/Contact\\"):eval(\\"require.resolve\\")(\\"./views/Contact\\")}});"`;

exports[`Target: Browser: Prod loadable magic-comments 1`] = `"import\\"core-js/modules/es.object.to-string\\";import\\"core-js/modules/es.promise\\";import loadable from\\"loadable-components\\";export var Home=loadable({chunkName:function chunkName(){return\\"Home-JfPYC\\"},isReady:function isReady(){return\\"undefined\\"!=typeof __webpack_modules__&&!!__webpack_modules__[this.resolve(a)]},requireAsync:function requireAsync(){return import(/* webpackChunkName: \\"Home-JfPYC\\" */\\"./views/Home\\")},requireSync:function requireSync(props){var id=this.resolve(props);return\\"undefined\\"==typeof __webpack_require__?eval(\\"module.require\\")(id):__webpack_require__(id)},resolve:function resolve(){return require.resolveWeak?require.resolveWeak(\\"./views/Home\\"):eval(\\"require.resolve\\")(\\"./views/Home\\")}});export var About=loadable({chunkName:function chunkName(){return\\"About\\"},isReady:function isReady(){return\\"undefined\\"!=typeof __webpack_modules__&&!!__webpack_modules__[this.resolve(a)]},requireAsync:function requireAsync(){return import(/* webpackChunkName: \\"About\\" */\\"./views/About\\")},requireSync:function requireSync(props){var id=this.resolve(props);return\\"undefined\\"==typeof __webpack_require__?__webpack_require__(id):eval(\\"module.require\\")(id)},resolve:function resolve(){return require.resolveWeak?require.resolveWeak(\\"./views/About\\"):eval(\\"require.resolve\\")(\\"./views/About\\")}});export var Contact=loadable({chunkName:function chunkName(){return\\"Contact-AIf6m\\"},isReady:function isReady(a){return\\"undefined\\"!=typeof __webpack_modules__&&!!__webpack_modules__[this.resolve(a)]},requireAsync:function requireAsync(){return import(/* webpackMode: \\"lazy\\", webpackFoo: \\"bar\\", webpackChunkName: \\"Contact-AIf6m\\" */\\"./views/Contact\\")},requireSync:function requireSync(props){var id=this.resolve(props);return\\"undefined\\"==typeof __webpack_require__?__webpack_require__(id):eval(\\"module.require\\")(id)},resolve:function resolve(){return require.resolveWeak?require.resolveWeak(\\"./views/Contact\\"):eval(\\"require.resolve\\")(\\"./views/Contact\\")}});"`;
exports[`Target: Browser: Prod loadable magic-comments 1`] = `"import\\"core-js/modules/es.object.to-string\\";import\\"core-js/modules/es.promise\\";import loadable from\\"@loadable/component\\";export var Home=loadable({chunkName:function chunkName(){return\\"Home-JfPYC\\"},isReady:function isReady(){return\\"undefined\\"!=typeof __webpack_modules__&&!!__webpack_modules__[this.resolve(a)]},requireAsync:function requireAsync(){return import(/* webpackChunkName: \\"Home-JfPYC\\" */\\"./views/Home\\")},requireSync:function requireSync(props){var id=this.resolve(props);return\\"undefined\\"==typeof __webpack_require__?eval(\\"module.require\\")(id):__webpack_require__(id)},resolve:function resolve(){return require.resolveWeak?require.resolveWeak(\\"./views/Home\\"):eval(\\"require.resolve\\")(\\"./views/Home\\")}});export var About=loadable({chunkName:function chunkName(){return\\"About\\"},isReady:function isReady(){return\\"undefined\\"!=typeof __webpack_modules__&&!!__webpack_modules__[this.resolve(a)]},requireAsync:function requireAsync(){return import(/* webpackChunkName: \\"About\\" */\\"./views/About\\")},requireSync:function requireSync(props){var id=this.resolve(props);return\\"undefined\\"==typeof __webpack_require__?__webpack_require__(id):eval(\\"module.require\\")(id)},resolve:function resolve(){return require.resolveWeak?require.resolveWeak(\\"./views/About\\"):eval(\\"require.resolve\\")(\\"./views/About\\")}});export var Contact=loadable({chunkName:function chunkName(){return\\"Contact-AIf6m\\"},isReady:function isReady(a){return\\"undefined\\"!=typeof __webpack_modules__&&!!__webpack_modules__[this.resolve(a)]},requireAsync:function requireAsync(){return import(/* webpackMode: \\"lazy\\", webpackFoo: \\"bar\\", webpackChunkName: \\"Contact-AIf6m\\" */\\"./views/Contact\\")},requireSync:function requireSync(props){var id=this.resolve(props);return\\"undefined\\"==typeof __webpack_require__?__webpack_require__(id):eval(\\"module.require\\")(id)},resolve:function resolve(){return require.resolveWeak?require.resolveWeak(\\"./views/Contact\\"):eval(\\"require.resolve\\")(\\"./views/Contact\\")}});"`;

exports[`Target: Browser: Prod loadable wildcard 1`] = `"import\\"core-js/modules/es.object.to-string\\";import\\"core-js/modules/es.promise\\";import\\"core-js/modules/es.string.replace\\";import loadable from\\"loadable-components\\";var page=\\"About\\",lang=\\"de_DE\\";export var views=loadable({chunkName:function chunkName(){return\\"views-About\\".replace(/[^a-zA-Z0-9_!§$()=\\\\-^°]+/g,\\"-\\")},isReady:function isReady(){return\\"undefined\\"!=typeof __webpack_modules__&&!!__webpack_modules__[this.resolve(a)]},requireAsync:function requireAsync(){return import(/* webpackChunkName: \\"views-[request]\\" */\\"./views/About\\")},requireSync:function requireSync(props){var id=this.resolve(props);return\\"undefined\\"==typeof __webpack_require__?__webpack_require__(id):eval(\\"module.require\\")(id)},resolve:function resolve(){return require.resolveWeak?require.resolveWeak(\\"./views/About\\"):eval(\\"require.resolve\\")(\\"./views/About\\")}});export var leanIntlData=loadable({chunkName:function chunkName(){return(\\"lean-intl-locale-data-\\"+lang).replace(/[^a-zA-Z0-9_!§$()=\\\\-^°]+/g,\\"-\\")},isReady:function isReady(){return\\"undefined\\"!=typeof __webpack_modules__&&!!__webpack_modules__[this.resolve(a)]},requireAsync:function requireAsync(){return import(/* webpackChunkName: \\"lean-intl-locale-data-[request]\\" */\\"./lean-intl/locale-data/\\"+lang)},requireSync:function requireSync(props){var id=this.resolve(props);return\\"undefined\\"==typeof __webpack_require__?__webpack_require__(id):eval(\\"module.require\\")(id)},resolve:function resolve(){return require.resolveWeak?require.resolveWeak(\\"./lean-intl/locale-data/\\"+lang):eval(\\"require.resolve\\")(\\"./lean-intl/locale-data/\\"+lang)}});export var reactIntlData=loadable({chunkName:function chunkName(){return(\\"react-intl-locale-data-\\"+lang).replace(/[^a-zA-Z0-9_!§$()=\\\\-^°]+/g,\\"-\\")},isReady:function isReady(){return\\"undefined\\"!=typeof __webpack_modules__&&!!__webpack_modules__[this.resolve(a)]},requireAsync:function requireAsync(){return import(/* webpackChunkName: \\"react-intl-locale-data-[request]\\" */\\"./react-intl/locale-data/\\"+lang)},requireSync:function requireSync(props){var id=this.resolve(props);return\\"undefined\\"==typeof __webpack_require__?__webpack_require__(id):eval(\\"module.require\\")(id)},resolve:function resolve(){return require.resolveWeak?require.resolveWeak(\\"./react-intl/locale-data/\\"+lang):eval(\\"require.resolve\\")(\\"./react-intl/locale-data/\\"+lang)}});"`;
exports[`Target: Browser: Prod loadable wildcard 1`] = `"import\\"core-js/modules/es.object.to-string\\";import\\"core-js/modules/es.promise\\";import\\"core-js/modules/es.string.replace\\";import loadable from\\"@loadable/component\\";var page=\\"About\\",lang=\\"de_DE\\";export var views=loadable({chunkName:function chunkName(){return\\"views-About\\".replace(/[^a-zA-Z0-9_!§$()=\\\\-^°]+/g,\\"-\\")},isReady:function isReady(){return\\"undefined\\"!=typeof __webpack_modules__&&!!__webpack_modules__[this.resolve(a)]},requireAsync:function requireAsync(){return import(/* webpackChunkName: \\"views-[request]\\" */\\"./views/About\\")},requireSync:function requireSync(props){var id=this.resolve(props);return\\"undefined\\"==typeof __webpack_require__?__webpack_require__(id):eval(\\"module.require\\")(id)},resolve:function resolve(){return require.resolveWeak?require.resolveWeak(\\"./views/About\\"):eval(\\"require.resolve\\")(\\"./views/About\\")}});export var leanIntlData=loadable({chunkName:function chunkName(){return(\\"lean-intl-locale-data-\\"+lang).replace(/[^a-zA-Z0-9_!§$()=\\\\-^°]+/g,\\"-\\")},isReady:function isReady(){return\\"undefined\\"!=typeof __webpack_modules__&&!!__webpack_modules__[this.resolve(a)]},requireAsync:function requireAsync(){return import(/* webpackChunkName: \\"lean-intl-locale-data-[request]\\" */\\"./lean-intl/locale-data/\\"+lang)},requireSync:function requireSync(props){var id=this.resolve(props);return\\"undefined\\"==typeof __webpack_require__?__webpack_require__(id):eval(\\"module.require\\")(id)},resolve:function resolve(){return require.resolveWeak?require.resolveWeak(\\"./lean-intl/locale-data/\\"+lang):eval(\\"require.resolve\\")(\\"./lean-intl/locale-data/\\"+lang)}});export var reactIntlData=loadable({chunkName:function chunkName(){return(\\"react-intl-locale-data-\\"+lang).replace(/[^a-zA-Z0-9_!§$()=\\\\-^°]+/g,\\"-\\")},isReady:function isReady(){return\\"undefined\\"!=typeof __webpack_modules__&&!!__webpack_modules__[this.resolve(a)]},requireAsync:function requireAsync(){return import(/* webpackChunkName: \\"react-intl-locale-data-[request]\\" */\\"./react-intl/locale-data/\\"+lang)},requireSync:function requireSync(props){var id=this.resolve(props);return\\"undefined\\"==typeof __webpack_require__?__webpack_require__(id):eval(\\"module.require\\")(id)},resolve:function resolve(){return require.resolveWeak?require.resolveWeak(\\"./react-intl/locale-data/\\"+lang):eval(\\"require.resolve\\")(\\"./react-intl/locale-data/\\"+lang)}});"`;

exports[`Target: Browser: Prod lodash: async 1`] = `"import _parallel from\\"async/parallel\\";_parallel([]);"`;

Expand Down
Loading

0 comments on commit c3eb6f3

Please sign in to comment.