Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add webpack configuration
Michał Ociepka32e3ddb5cfe5
diff --git a/package.json b/package.jsonindex 84ae2dbd8c..0dad9e2a76 100644--- a/package.json+++ b/package.json@@ -17,18 +17,58 @@},"dependencies": {"autoprefixer": "~6.0.3",- "bower": "^1.3.12",+ "bootstrap-sass": "^3.3.5","csswring": "^4.0.0",+ "dropzone": "^4.2.0",+ "font-awesome": "^4.4.0",+ "hammerjs": "^2.0.4",+ "jquery": "^2.1.4",+ "jquery-match-height": "^0.6.0",+ "jquery-ui": "^1.10.5",+ "jquery.cookie": "^1.4.1",+ "materialize-css": "git+https://github.com/NicholasAntonov/materialize.git",+ "modernizr": "^3.2.0",+ "react": "^0.14.2",+ "react-dom": "^0.14.2",+ "select2": "^4.0.0",+ "sortablejs": "^1.4.2"+ },+ "babel": {+ "presets": [+ "stage-0",+ "es2015",+ "react"+ ]+ },+ "devDependencies": {+ "autoprefixer-core": "~5.2.0",+ "babel-core": "^6.1.2",+ "babel-loader": "^6.0.1",+ "babel-preset-es2015": "^6.1.2",+ "babel-preset-react": "^6.0.15",+ "babel-preset-stage-0": "^6.0.15",+ "bower": "^1.3.12",+ "css-loader": "^0.22.0",+ "csswring": "~3.0.5","grunt": "~0.4.5",- "grunt-babel": "~5.0.1",+ "grunt-babel": "^6.0.0","grunt-browser-sync": "~2.1.3","grunt-cli": "^0.1.13","grunt-contrib-copy": "~0.6.0","grunt-contrib-less": "~0.11.2","grunt-contrib-uglify": "~0.9.1","grunt-contrib-watch": "~0.6.1",- "grunt-postcss": "^0.7.0",+ "grunt-postcss": "~0.4.0","grunt-sass": "~1.0.0",- "load-grunt-tasks": "~3.2.0"+ "less": "^2.5.3",+ "less-loader": "^2.2.1",+ "load-grunt-tasks": "~3.2.0",+ "sass-loader": "^3.1.1",+ "style-loader": "^0.13.0",+ "webpack": "^1.12.2"+ },+ "scripts": {+ "build": "UV_THREADPOOL_SIZE=100 ./node_modules/.bin/webpack --progress",+ "watch": "UV_THREADPOOL_SIZE=100 ./node_modules/.bin/webpack --progress --debug --devtool source-map --watch"}}diff --git a/webpack.config.js b/webpack.config.jsnew file mode 100644index 0000000000..2bad98bdbf--- /dev/null+++ b/webpack.config.js@@ -0,0 +1,35 @@+var path = require('path');+var webpack = require('webpack');++configuration = {+ entry: {+ dashboard: './saleor/static/js_src/dashboard.jsx',+ },+ output: {+ filename: './saleor/static/js/[name].js'+ },+ module: {+ loaders: [+ {test: /\.jsx?$/, exclude: /node_modules/, loader: "babel-loader"},+ {test: /\.json$/, loader: 'json'},+ //{test: require.resolve("jquery"), loader: "expose?jQueryDebug"}+ ]+ },+ resolve: {+ extensions: ['', '.js']+ },+ plugins: [+ new webpack.ProvidePlugin({+ $: 'jquery',+ jQuery: 'jquery',+ 'window.jQuery': 'jquery'+ }),+ new webpack.ProvidePlugin({+ '_': 'underscore',+ Backbone: 'backbone',+ 'window.Backbone': 'backbone'+ })+ ]+};++module.exports = configuration