Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/babel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var defaultBrowserListDev = [
'ios_saf >= 10.3',
'edge >= 16',
'opera >= 48',
'samsung >= 8.2'
'samsung >= 8.2',
];

// preact-cli babel configs
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/cli/sw/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { registerRoute, setCatchHandler } from 'workbox-routing';
import { precacheAndRoute, getCacheKeyForURL } from 'workbox-precaching';
import { isNav } from './utils';
import { NETWORK_HANDLER, PRECACHING_OPTIONS } from './contants';
import { NETWORK_HANDLER, PRECACHING_OPTIONS } from './constants';

export function getFiles() {
return self.__WB_MANIFEST;
Expand Down
4 changes: 3 additions & 1 deletion packages/cli/tests/build.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,10 @@ describe('preact build', () => {
`${dir}/build/${bundleFile}`,
'utf8'
);

// "Hello World!" should replace 'process.env.PREACT_APP_MY_VARIABLE'
expect(transpiledChunk.includes('console.log("Hello World!")')).toBe(true);
expect(transpiledChunk.includes('"Hello World!"')).toBe(true);
expect(transpiledChunk.includes('PREACT_APP_MY_VARIABLE')).toBe(false);
});

it('should respect `publicPath` value', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/tests/lib/chrome.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports.waitUntilExpression = async function (page, expression) {
`Waiting for ${expression}`
);

return result; // && result.value;
return result;
};

await waitUntil(evaluate, `Waiting for ${expression} timed out!`);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/tests/lib/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async function tmpDir() {
let str = Math.random()
.toString(36)
.replace(/[^a-z]+/g, '')
.substr(0, 12);
.substring(0, 12);
await mkdir(output, { recursive: true });
return resolve(output, str);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/tests/subjects/custom-dotenv/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
console.log(process.env.PREACT_APP_MY_VARIABLE);
export const MY_VARIABLE = process.env.PREACT_APP_MY_VARIABLE;