Skip to content

Commit b48b214

Browse files
Remove esbuild optimiser (#20)
1 parent e425ab1 commit b48b214

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+233
-478
lines changed

packages/core/integration-tests/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"command-exists": "^1.2.6",
2929
"core-js": "^3.2.1",
3030
"cross-env": "^7.0.0",
31+
"esbuild": "^0.23.1",
3132
"esbuild-register": "^3.5.0",
3233
"exif-reader": "^1.0.3",
3334
"get-port": "^5.0.0",

packages/examples/eslint-example/package.json

-26
This file was deleted.
File renamed without changes.

packages/examples/eslint/package.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "@atlaspack/eslint-example",
3+
"version": "2.12.0",
4+
"license": "MIT",
5+
"private": true,
6+
"scripts": {
7+
"build": "atlaspack build src/index.js"
8+
},
9+
"devDependencies": {
10+
"@atlaspack/cli": "^2.12.0",
11+
"@atlaspack/config-default": "^2.12.0",
12+
"@atlaspack/validator-eslint": "^2.12.0"
13+
}
14+
}

packages/examples/html/package.json

+1-8
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,9 @@
44
"license": "MIT",
55
"private": true,
66
"scripts": {
7-
"demo": "atlaspack build src/index.html"
7+
"start": "atlaspack src/index.html --open"
88
},
9-
"browserslist": [
10-
"last 2 versions",
11-
"not edge < 76",
12-
"not firefox < 67"
13-
],
149
"devDependencies": {
15-
"@babel/core": "^7.22.11",
16-
"@atlaspack/babel-register": "2.12.0",
1710
"@atlaspack/cli": "2.12.0"
1811
},
1912
"dependencies": {

packages/examples/html/src/index.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
<!DOCTYPE html>
2-
<html>
1+
<!doctype html>
2+
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<title>HTML Example</title>
6-
<script type="module" src="./index.js"></script>
5+
<title>Atlaspack | HTML Example</title>
6+
<script type="module" src="index.js"></script>
77
</head>
88
<body>
99
<h1>Hello world</h1>

packages/examples/internalize-example/async.js

-4
This file was deleted.

packages/examples/internalize-example/index-other.js

-2
This file was deleted.

packages/examples/internalize-example/index-sync.js

-1
This file was deleted.

packages/examples/internalize-example/index.html

-1
This file was deleted.

packages/examples/internalize-example/index.js

-6
This file was deleted.

packages/examples/internalize-example/package.json

-6
This file was deleted.

packages/examples/kitchen-sink/legacy.html

-24
This file was deleted.

packages/examples/kitchen-sink/modern.html

-24
This file was deleted.

packages/examples/kitchen-sink/package.json

+8-14
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@
44
"license": "MIT",
55
"private": true,
66
"scripts": {
7-
"serve": "atlaspack serve src/index.html --https --open",
8-
"build": "rm -rf dist && atlaspack build src/index.html --no-cache"
7+
"start": "atlaspack src/index.html --https --open"
8+
},
9+
"dependencies": {
10+
"@swc/helpers": "^0.5.0",
11+
"lodash": "^4.17.11",
12+
"react": "^17.0.2",
13+
"react-dom": "^17.0.2"
914
},
1015
"devDependencies": {
11-
"@babel/core": "^7.22.11",
12-
"@atlaspack/babel-register": "2.12.0",
13-
"@atlaspack/cli": "2.12.0",
14-
"@atlaspack/config-default": "2.12.0",
15-
"@atlaspack/core": "2.12.0",
16-
"@atlaspack/optimizer-esbuild": "2.12.0",
17-
"@atlaspack/reporter-sourcemap-visualiser": "2.12.0"
16+
"@atlaspack/cli": "^2.12.0"
1817
},
1918
"targets": {
2019
"browserModern": {
@@ -33,10 +32,5 @@
3332
]
3433
}
3534
}
36-
},
37-
"dependencies": {
38-
"lodash": "^4.17.11",
39-
"react": "^17.0.2",
40-
"react-dom": "^17.0.2"
4135
}
4236
}
+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
require('./paragraphs.css');
1+
import './paragraphs.css';
22

3-
console.log(require('react'));
3+
import React from 'react';
4+
5+
console.log('react', React);
46
require('lodash');
57

68
class Foo {}

packages/examples/kitchen-sink/src/index.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<!DOCTYPE html>
2-
<html>
1+
<!doctype html>
2+
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<title>Modern Simple Example</title>
5+
<title>Atlaspack | Kitchen Sink Example</title>
66
<link rel="stylesheet" href="styles.css" />
7-
<script src="index.js"></script>
7+
<script type="module" src="index.js"></script>
88
</head>
99
<body>
1010
<h1>I am an H1</h1>
+5-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
import styles from './styles.css';
21
import atlaspack from 'url:./atlaspack.webp';
32
import {message} from './message';
43

54
import('./async');
65
import('./async2');
76

8-
new Worker(new URL('worker.js', import.meta.url));
7+
new Worker(new URL('worker.js', import.meta.url), {type: 'module'});
98

109
console.log(message);
1110

12-
// const message = require('./message');
13-
// const fs = require('fs');
11+
let icon = document.createElement('img');
12+
icon.src = atlaspack;
13+
icon.width = 100;
1414

15-
// console.log(message);
16-
// console.log(fs.readFileSync(__dirname + '/test.txt', 'utf8'));
17-
18-
// class Test {}
15+
document.body.prepend(icon);
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
const textUrl = require('url:./test.txt');
2+
23
console.log('logged from worker.js', textUrl);

packages/examples/react-hmr/package.json

+2-18
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,10 @@
44
"license": "MIT",
55
"private": true,
66
"scripts": {
7-
"demo": "atlaspack serve src/index.html --no-cache --https"
7+
"start": "atlaspack src/index.html --https --open"
88
},
99
"devDependencies": {
10-
"@atlaspack/cli": "2.12.0"
11-
},
12-
"targets": {
13-
"browserModern": {
14-
"engines": {
15-
"browsers": [
16-
"last 1 Chrome version"
17-
]
18-
}
19-
},
20-
"browser": {
21-
"engines": {
22-
"browsers": [
23-
"> 0.25%"
24-
]
25-
}
26-
}
10+
"@atlaspack/cli": "^2.12.0"
2711
},
2812
"dependencies": {
2913
"react": "^17.0.2",
+3-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
4-
<meta charset="UTF-8" />
4+
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
76
<title>Atlaspack | React Example</title>
87
</head>
98
<body>
109
<div id="app"></div>
11-
12-
<script src="index.js"></script>
10+
<script type="module" src="index.js"></script>
1311
</body>
1412
</html>

packages/examples/react-refresh/package.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44
"license": "MIT",
55
"private": true,
66
"scripts": {
7-
"start": "atlaspack src/index.html"
7+
"start": "atlaspack src/index.html --open"
88
},
99
"devDependencies": {
10-
"@babel/core": "^7.22.11",
11-
"@atlaspack/babel-register": "2.12.0",
12-
"@atlaspack/core": "2.12.0"
10+
"@atlaspack/cli": "^2.12.0"
1311
},
1412
"dependencies": {
1513
"react": "^17.0.2",

packages/examples/simple/.atlaspackrc

-3
This file was deleted.

packages/examples/simple/package.json

+2-21
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,9 @@
44
"license": "MIT",
55
"private": true,
66
"scripts": {
7-
"build": "ATLASPACK_WORKERS=0 atlaspack src/index.js --no-cache",
8-
"clean-demo": "rm -rf .atlaspack-cache dist && yarn demo"
7+
"build": "atlaspack build src/index.js"
98
},
109
"devDependencies": {
11-
"@babel/core": "^7.22.11",
12-
"@atlaspack/babel-register": "2.12.0",
13-
"@atlaspack/core": "2.12.0"
14-
},
15-
"browser": "dist/legacy/index.js",
16-
"browserModern": "dist/modern/index.js",
17-
"targets": {
18-
"browser": {
19-
"engines": {
20-
"browsers": [
21-
"last 1 Chrome version"
22-
]
23-
}
24-
}
25-
},
26-
"dependencies": {
27-
"lodash": "^4.17.11",
28-
"react": "^17.0.2",
29-
"react-dom": "^17.0.2"
10+
"@atlaspack/cli": "^2.12.0"
3011
}
3112
}

packages/examples/three/.atlaspackrc

-6
This file was deleted.

packages/examples/three/.gitignore

-2
This file was deleted.

packages/examples/three/Makefile

-9
This file was deleted.

0 commit comments

Comments
 (0)