Skip to content

Commit

Permalink
PanoptesJS: add missing aliases to webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunanoordin committed Oct 11, 2024
1 parent a67248a commit 5d79efd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/lib-panoptes-js/dev/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { signIn } from '@src/experimental-auth.js'

class App {
constructor () {
this.html = {
Expand All @@ -9,6 +11,8 @@ class App {

loginForm_onSubmit (e) {
console.log('+++ loginForm_onSubmit', e)

experimentalAuth.signIn()

e.preventDefault()
return false
Expand Down
5 changes: 5 additions & 0 deletions packages/lib-panoptes-js/src/experimental-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ function broadcastEvent (eventType, args, _store) {
})
}

function signIn () {
console.log('1234')
}

export {
signIn,
checkCurrent,
addEventListener,
removeEventListener,
Expand Down
3 changes: 3 additions & 0 deletions packages/lib-panoptes-js/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ module.exports = {
],
mode: 'development',
resolve: {
alias: {
'@src': path.resolve(__dirname, 'src'),
},
fallback: {
fs: false,
// for markdown-it plugins
Expand Down

0 comments on commit 5d79efd

Please sign in to comment.