Last active
July 22, 2019 12:48
-
-
Save tobinbc/97e29c9546267edb1031cca8fb98af43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
context: 'src', | |
entry: { | |
popup: 'popup/popup.tsx', | |
"background-redirecter": 'background/redirecter/redirecter.ts', | |
"tab-redirect": 'tabs/redirect/redirect.tsx', | |
"content-redirect": 'content/redirect/redirect.ts', | |
"content-hangouts": 'content/hangouts/hangouts.ts', | |
}, | |
output: { | |
filename: '[name].bundle.js', | |
path: 'dist' | |
}, | |
module: { | |
rules: [ | |
... | |
{ | |
test: /\.scss$/, | |
use: [ | |
{ | |
loader: 'file-loader', | |
options: { | |
name: '[name].bundle.css' | |
} | |
}, | |
{ loader: 'extract-loader' }, | |
{ loader: 'css-loader' }, | |
{ | |
loader: 'sass-loader', | |
options: { | |
includePaths: ['./node_modules'] | |
} | |
} | |
] | |
} | |
... | |
] | |
}, | |
plugins: [ | |
new CopyPlugin([{ from: 'assets/*', to: 'dist', flatten: true }]), | |
new HtmlWebpackPlugin({ | |
chunks: ['popup'], | |
filename: 'popup.html', | |
template: 'popup/popup.html' | |
}), | |
new HtmlWebpackPlugin({ | |
chunks: ['tab-redirect'], | |
filename: 'tab-redirect.html', | |
template: 'tabs/redirect/redirect.html' | |
}) | |
], | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment