Skip to content

Commit

Permalink
RC #121 - Updating webpack to transpile react-syntax-highlighter
Browse files Browse the repository at this point in the history
  • Loading branch information
dleadbetter committed Apr 8, 2022
1 parent a8f63ce commit 2086281
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ if (mode === 'development') {
module.exports = {
mode,
devtool,
target: 'node',
entry: './src/index.js',
externals: [nodeExternals()],
externals: [nodeExternals({
allowlist: ['react-syntax-highlighter']
})],
output: {
filename: 'index.js',
path: path.resolve(__dirname, 'build'),
Expand All @@ -30,7 +33,10 @@ module.exports = {
module: {
rules: [{
test: /\.(js|jsx)$/,
include: path.resolve(__dirname, './src'),
include: [
path.resolve(__dirname, './src'),
path.resolve(__dirname, './node_modules/react-syntax-highlighter')
],
use: ['babel-loader']
}, {
test: /\.css$/,
Expand Down

0 comments on commit 2086281

Please sign in to comment.