Skip to content
This repository was archived by the owner on Nov 16, 2018. It is now read-only.

change local settings of webpack to fix error 'Unexpected token" #21

Open
wants to merge 1 commit into
base: step3_add_django_webpack_loader
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion django/webpack.local.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ config.plugins = config.plugins.concat([
])

config.module.loaders.push(
{ test: /\.jsx?$/, exclude: /node_modules/, loaders: ['react-hot', 'babel'] }
{
test: /\.jsx?$/, // Match both .js and .jsx files
exclude: /node_modules/,
loader: "babel",
query:
{
presets:['react']
}
}
)

module.exports = config