Skip to content

Commit cc3d2c7

Browse files
Add jQuery import and update script source
The jQuery import was added to `main.js`. This was also reflected in `index.html`, where the script source was changed from local to a CDN link with integrity and anonymity attributes. Additionally, the base path was updated in `vite.config.js` for proper module resolution.
1 parent c2d6f0c commit cc3d2c7

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ <h6 class="dropdown-header">Size</h6>
9999
</div>
100100
</div>
101101

102-
<script type="module" src="node_modules/jquery/dist/jquery.min.js"></script>
102+
<script src="https://code.jquery.com/jquery-3.7.0.min.js" integrity="sha256-2Pmvv0kuTBOenSvLm6bvfBSSHrUJ+3A7x6P5Ebd07/g=" crossorigin="anonymous"></script>
103103
<script type="module" src="node_modules/@popperjs/core/dist/umd/popper.min.js"></script>
104104
<script type="module" src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
105105
<script type="module" src="./main.js"></script>

main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import '@minesweeper/scss/style.scss';
2+
import 'jquery';
23
import 'tickwatchjs';
34
import * as svgs from './src/js/svgs.js';
45

vite.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ aliasesStrings.forEach(alias => {
1010

1111
// noinspection JSUnusedGlobalSymbols
1212
export default defineConfig({
13+
base: './',
1314
build: {
1415
rollupOptions: {
1516
input: path.resolve(__dirname, 'index.html'),

0 commit comments

Comments
 (0)