Permalink
Browse files

Consider chunks called `main.js` as main & next.js (#75)

This PR introduces two changes:

- Now the webpack plugin considers files called `main.js` as main chunks
- Introduces an integration test with next.js

Fix #46.
  • Loading branch information...
mgechev committed Sep 3, 2018
1 parent 490359d commit fe8739b9a90dd84200b5dba5ee670f31dbbbc5eb
@@ -9,5 +9,5 @@ readdirSync(base).forEach(dir => {
if (dir === '.' || dir === '..') {
return;
}
execSync(`cd ${join(base, dir)} && rm -rf dist && ${cwd}/node_modules/.bin/webpack`);
execSync(`cd ${join(base, dir)} && rm -rf dist && npm i && npm run build`);
});
@@ -5,8 +5,8 @@ import chalk from 'chalk';
const StaticServer = require('static-server');
const port = 5122;
function setupMockServer() {
return new Promise(resolve => {
const setupMockServers = () =>
new Promise(resolve => {
const server = new StaticServer({
rootPath: join(process.cwd(), 'packages', 'guess-webpack', 'test', 'fixtures'),
port
@@ -17,10 +17,9 @@ function setupMockServer() {
resolve(server);
});
});
}
async function main() {
await setupMockServer();
await setupMockServers();
const options = process.argv.filter(a => a === '--watch');
const jest = spawn(`${process.cwd()}/node_modules/.bin/jest`, options, { stdio: 'inherit' });
return new Promise<number>(resolve => {

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -42,7 +42,7 @@
"lerna": "^2.11.0",
"meow": "^4.0.0",
"prompt-confirm": "^1.2.0",
"puppeteer": "^1.5.0",
"puppeteer": "^1.7.0",
"raw-loader": "^0.5.1",
"static-server": "^2.2.1",
"ts-jest": "^22.4.1",
Oops, something went wrong.

0 comments on commit fe8739b

Please sign in to comment.