mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 07:04:45 -04:00
Create webpack config
This commit is contained in:
parent
f0269a161c
commit
325d1f1a32
2 changed files with 126 additions and 5 deletions
64
webpack.config.js
Normal file
64
webpack.config.js
Normal file
|
@ -0,0 +1,64 @@
|
|||
var webpack = require('webpack');
|
||||
var path = require('path');
|
||||
var ExtractTextPlugin = require("extract-text-webpack-plugin");
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
new webpack.ProvidePlugin({
|
||||
'_': 'lodash',
|
||||
jquery: "jquery",
|
||||
jQuery: "jquery",
|
||||
$: "jquery",
|
||||
"window.jQuery": "jquery",
|
||||
Visibility: "visibilityjs",
|
||||
Cookies: "js-cookie",
|
||||
CodeMirror: "codemirror"
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
"require.specified": "require.resolve"
|
||||
})
|
||||
],
|
||||
|
||||
entry: {
|
||||
app: path.join(__dirname, 'public/js/app.js')
|
||||
},
|
||||
|
||||
output: {
|
||||
path: path.join(__dirname, 'public/build/js'),
|
||||
filename: '[name].js'
|
||||
},
|
||||
|
||||
resolve: {
|
||||
root: [
|
||||
path.resolve(__dirname, 'src'),
|
||||
path.resolve(__dirname, 'node_modules')
|
||||
],
|
||||
extensions: ["", ".js"],
|
||||
alias: {
|
||||
'jquery-ui': 'jquery-ui/ui/widgets'
|
||||
}
|
||||
},
|
||||
|
||||
module: {
|
||||
loaders: [{
|
||||
test: /\.json$/,
|
||||
loader: 'json-loader'
|
||||
}, {
|
||||
test: /\.css$/,
|
||||
loader: ExtractTextPlugin.extract({
|
||||
fallbackLoader: "style-loader",
|
||||
loader: "css-loader"
|
||||
})
|
||||
}, {
|
||||
test: /\.scss$/,
|
||||
loaders: ['style', 'css', 'sass']
|
||||
}, {
|
||||
test: require.resolve("js-sequence-diagrams"),
|
||||
loader: "imports?Raphael=raphael"
|
||||
}]
|
||||
},
|
||||
|
||||
node: {
|
||||
fs: "empty"
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue