mirror of
https://github.com/scratchfoundation/scratchjr-website.git
synced 2025-07-26 05:59:08 -04:00
Began setup of webpack dev server environment, still requires some refactoring
This commit is contained in:
parent
eb54820dd3
commit
fa091e4a0c
222 changed files with 338442 additions and 0 deletions
40
webpack.config.js
Normal file
40
webpack.config.js
Normal file
|
@ -0,0 +1,40 @@
|
|||
var CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
var path = require('path');
|
||||
|
||||
module.exports = {
|
||||
entry: './src/main.jsx',
|
||||
externals: {
|
||||
'react': 'React',
|
||||
'react/addons': 'React',
|
||||
'react-dom': 'ReactDOM',
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'build'),
|
||||
filename: 'js/[name].bundle.js'
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.jsx$/,
|
||||
loader: 'babel-loader',
|
||||
include: path.resolve(__dirname, 'src'),
|
||||
query: {
|
||||
presets: ['es2015', 'react']
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.json$/,
|
||||
loader: 'json-loader'
|
||||
},
|
||||
{
|
||||
test: /\.less$/,
|
||||
loader: 'style!css!less'
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new CopyWebpackPlugin([
|
||||
{from: 'static'}
|
||||
])
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue