Updated webpack deps.

This commit is contained in:
orangemug 2017-11-07 11:05:30 +00:00
parent 41e1704d08
commit b5ca0fa17b
4 changed files with 13 additions and 13 deletions

View file

@ -20,7 +20,7 @@ module.exports = {
filename: 'bundle.js' filename: 'bundle.js'
}, },
resolve: { resolve: {
extensions: ['', '.js', '.jsx'] extensions: ['.js', '.jsx']
}, },
module: { module: {
noParse: [ noParse: [
@ -48,7 +48,7 @@ module.exports = {
host: HOST host: HOST
}, },
plugins: [ plugins: [
new webpack.NoErrorsPlugin(), new webpack.NoEmitOnErrorsPlugin(),
new webpack.HotModuleReplacementPlugin(), new webpack.HotModuleReplacementPlugin(),
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
title: 'Maputnik', title: 'Maputnik',

View file

@ -7,23 +7,23 @@ module.exports = [
{ {
test: /\.jsx?$/, test: /\.jsx?$/,
exclude: /(.*node_modules(?![\/\\]@mapbox[\/\\]mapbox-gl-style-spec)|bower_components|public)/, exclude: /(.*node_modules(?![\/\\]@mapbox[\/\\]mapbox-gl-style-spec)|bower_components|public)/,
loader: 'babel', loader: 'babel-loader',
query: { query: {
presets: ['es2015', 'react'], presets: ['env', 'react'],
plugins: ['transform-runtime', 'transform-decorators-legacy', 'transform-class-properties'], plugins: ['transform-runtime', 'transform-decorators-legacy', 'transform-class-properties'],
} }
}, },
{ {
test: /\.(eot|ttf|woff|woff2)$/, test: /\.(eot|ttf|woff|woff2)$/,
loader: 'file?name=fonts/[name].[ext]' loader: 'file-loader?name=fonts/[name].[ext]'
}, },
{ {
test: /\.ico$/, test: /\.ico$/,
loader: 'file?name=[name].[ext]' loader: 'file-loader?name=[name].[ext]'
}, },
{ {
test: /\.(svg|gif|jpg|png)$/, test: /\.(svg|gif|jpg|png)$/,
loader: 'file?name=img/[name].[ext]' loader: 'file-loader?name=img/[name].[ext]'
}, },
{ {
test: /\.json$/, test: /\.json$/,
@ -36,8 +36,8 @@ module.exports = [
{ {
test: /[\/\\](node_modules|global|src)[\/\\].*\.css$/, test: /[\/\\](node_modules|global|src)[\/\\].*\.css$/,
loaders: [ loaders: [
'style?sourceMap', 'style-loader?sourceMap',
'css' 'css-loader'
] ]
} }
]; ];

View file

@ -124,8 +124,8 @@
"wdio-phantomjs-service": "^0.2.2", "wdio-phantomjs-service": "^0.2.2",
"wdio-spec-reporter": "^0.1.2", "wdio-spec-reporter": "^0.1.2",
"webdriverio": "^4.8.0", "webdriverio": "^4.8.0",
"webpack": "^1.14.0", "webpack": "^3.8.1",
"webpack-cleanup-plugin": "^0.4.2", "webpack-cleanup-plugin": "^0.5.1",
"webpack-dev-server": "^1.16.2" "webpack-dev-server": "^2.9.4"
} }
} }

View file

@ -1,7 +1,7 @@
import MapboxGl from 'mapbox-gl/dist/mapbox-gl.js' import MapboxGl from 'mapbox-gl/dist/mapbox-gl.js'
// Load mapbox-gl-rtl-text using object urls without needing http://localhost for AJAX. // Load mapbox-gl-rtl-text using object urls without needing http://localhost for AJAX.
const data = require("base64?mimetype=text/javascript!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.js"); const data = require("base64-loader?mimetype=text/javascript!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.js");
const blob = new window.Blob([window.atob(data)]); const blob = new window.Blob([window.atob(data)]);
const objectUrl = window.URL.createObjectURL(blob, { const objectUrl = window.URL.createObjectURL(blob, {