Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded to Parcel 2 #1216

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
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
10 changes: 10 additions & 0 deletions .proxyrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Allows resources (images, css) from other origins to be used
// Without this, parcel 2 blocks all external resources
// See https://git.io/JRYKi
module.exports = function (app) {
app.use((req, res, next) => {
res.removeHeader('Cross-Origin-Resource-Policy');
res.removeHeader('Cross-Origin-Embedder-Policy');
next();
});
};
2 changes: 1 addition & 1 deletion bh7.html
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,6 @@ <h2>contact us</h2>
</div>
</footer>
<!-- This is where Parcel imports are located! (SASS, etc.) -->
<script src="./bh7.js"></script>
<script type="module" src="./bh7.js"></script>
</body>
</html>
6 changes: 3 additions & 3 deletions bh7.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ new ActiveMenuLink(".navbar-items", options);


// Random hero SVG on each page load
import desk1 from './assets/hero/desk1.svg'
import desk2 from './assets/hero/desk2.svg'
import desk3 from './assets/hero/desk3.svg'
import desk1 from 'url:./assets/hero/desk1.svg'
import desk2 from 'url:./assets/hero/desk2.svg'
import desk3 from 'url:./assets/hero/desk3.svg'

$(document).ready(function() {
var deskIndex = parseInt(localStorage.getItem('deskIndex'));
Expand Down
2 changes: 1 addition & 1 deletion gallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,6 @@ <h1>BrickHack</h1>
</div>
<div class="image-container" id="bh"></div>
<!-- This is where Parcel imports are located! (SASS, etc.) -->
<script src="./gallery.js"></script>
<script src="./gallery.js" type="module"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@
</footer>

<!-- This is where Parcel imports are located! (SASS, etc.) -->
<script src="./index.js"></script>
<script type="module" src="./index.js"></script>
</body>
</html>
Loading