aboutsummaryrefslogtreecommitdiff
path: root/webpack.config.js
diff options
context:
space:
mode:
authorVincent Peugnet <33429034+vincent-peugnet@users.noreply.github.com>2019-10-21 23:52:50 +0200
committerGitHub <noreply@github.com>2019-10-21 23:52:50 +0200
commit26c93a796eceb3de136695548ab80e5455bd932a (patch)
treefa1f36802cdae44625a7a87960c5347e127f326d /webpack.config.js
parentba671a7c0880f8154a7b86d4cb172b0171e84021 (diff)
parent016dc180d41c28c8fb0883b09a55b69cb060a0c1 (diff)
downloadwcms-26c93a796eceb3de136695548ab80e5455bd932a.tar.gz
wcms-26c93a796eceb3de136695548ab80e5455bd932a.zip
Merge pull request #13 from n-peugnet/add-code-mirror
Include CodeMirror in edit page
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/webpack.config.js b/webpack.config.js
new file mode 100644
index 0000000..e18b201
--- /dev/null
+++ b/webpack.config.js
@@ -0,0 +1,30 @@
+const path = require('path');
+
+module.exports = (env) => {
+ return {
+ // Environment dependent
+ mode: env == 'dev' ? 'development' : 'production',
+ devtool: env == 'dev' ? 'inline-source-map' : 'none',
+
+ // Constant
+ entry: {
+ edit: './src/edit.js',
+ },
+ output: {
+ filename: 'assets/js/[name].bundle.js',
+ path: path.resolve(__dirname),
+ libraryTarget: 'window'
+ },
+ module: {
+ rules: [
+ {
+ test: /\.css$/,
+ use: [
+ 'style-loader',
+ 'css-loader',
+ ],
+ },
+ ],
+ },
+ }
+}; \ No newline at end of file