Revert "Merge pull request #663 from embark-framework/revert-656-bug_fix/dot.embark_versions_modules"

This reverts commit 7859c384ca, reversing
changes made to a58f21c303.
This commit is contained in:
Michael Bradley, Jr 2018-07-30 16:26:25 -05:00 committed by Iuri Matias
parent 5179eea56f
commit 314edadb57
3 changed files with 149 additions and 136 deletions

View File

@ -6,6 +6,7 @@ const constants = require('../constants');
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
const ProcessWrapper = require('../core/processes/processWrapper');
const path = require('path');
const glob = require('glob');
let webpackProcess;
@ -42,6 +43,14 @@ class WebpackProcess extends ProcessWrapper {
webpackRun(filename, options, includeModules, importsList, detectErrors, realCwd, callback) {
const self = this;
glob(fs.dappPath('.embark/versions') + '/*/*', (err, files) => {
let versions;
if (err) {
console.error(err);
versions = [];
} else {
versions = files;
}
let defaultOptions = {
mode: self.env === 'production' ? 'production' : 'none',
// devtool: self.env === 'development' ? 'source-map' : false,
@ -62,8 +71,9 @@ class WebpackProcess extends ProcessWrapper {
resolve: {
alias: importsList,
modules: [
fs.embarkPath('node_modules'),
fs.dappPath('node_modules')
fs.dappPath('node_modules'),
...versions,
fs.embarkPath('node_modules')
]
},
plugins: [
@ -100,7 +110,7 @@ class WebpackProcess extends ProcessWrapper {
{
test: /\.js$/,
loader: "babel-loader",
exclude: /(node_modules|bower_components)/,
exclude: /(node_modules|bower_components|\.embark\/versions)/,
options: {
presets: [
[
@ -122,8 +132,8 @@ class WebpackProcess extends ProcessWrapper {
}
}),
plugins: [
"@babel/plugin-transform-runtime",
"babel-plugin-webpack-aliases"
"babel-plugin-webpack-aliases",
"@babel/plugin-transform-runtime"
].map(require.resolve),
compact: false
}
@ -180,6 +190,7 @@ class WebpackProcess extends ProcessWrapper {
callback(err);
});
});
});
}
}

View File

@ -21,10 +21,11 @@
"url": "https://github.com/embark-framework/embark.git"
},
"dependencies": {
"@babel/core": "7.0.0-beta.54",
"@babel/plugin-transform-runtime": "7.0.0-beta.54",
"@babel/preset-env": "7.0.0-beta.54",
"@babel/preset-react": "7.0.0-beta.54",
"@babel/core": "^7.0.0-beta.54",
"@babel/plugin-transform-runtime": "^7.0.0-beta.54",
"@babel/preset-env": "^7.0.0-beta.54",
"@babel/preset-react": "^7.0.0-beta.54",
"@babel/runtime": "^7.0.0-beta.54",
"ascii-table": "0.0.9",
"async": "^2.0.1",
"babel-loader": "^8.0.0-beta.4",
@ -47,6 +48,7 @@
"follow-redirects": "^1.2.4",
"fs-extra": "^2.0.0",
"ganache-cli": "6.1.0",
"glob": "^7.1.2",
"globule": "^1.1.0",
"hard-source-webpack-plugin": "^0.11.1",
"http-proxy": "^1.17.0",

View File

@ -10,7 +10,7 @@
"license": "ISC",
"homepage": "",
"devDependencies": {
"babel-code-frame": "^6.26.0"
"@babel/code-frame": "^7.0.0-beta.54"
},
"dependencies": {
"bootstrap": "^3.3.6",