Skip to content

Commit

Permalink
webpack resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
ipanasenko committed Mar 6, 2023
1 parent b03299a commit 09181df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
4 changes: 4 additions & 0 deletions config/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ const common = {
},
],
},
resolve: {
// Help webpack resolve these extensions in order
extensions: ['.ts', '.js'],
},
plugins: [
// Copy static assets from `public` folder to `build` folder
new CopyWebpackPlugin({
Expand Down
13 changes: 1 addition & 12 deletions src/background.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
interface Settings {
'switch-in': 'current' | 'all';
'close-current': boolean;
}

const defaultSettings: Settings = {
'switch-in': 'current',
'close-current': true,
};

export const getSettings = async (): Promise<Settings> =>
(await chrome.storage.sync.get(defaultSettings)) as Settings;
import { getSettings } from './options';

chrome.action.onClicked.addListener(async ({ windowId, id }) => {
const settings = await getSettings();
Expand Down

0 comments on commit 09181df

Please sign in to comment.