diff --git a/lib/webpack/config-builder.js b/lib/webpack/config-builder.js index 5df3055..823cca4 100644 --- a/lib/webpack/config-builder.js +++ b/lib/webpack/config-builder.js @@ -53,6 +53,7 @@ function webpackConfigBuilder(filename, flags, params) { loaders: (0, _loaders.loaders)(flags, params) }, resolve: { + alias: { 'react/lib/ReactMount': 'react-dom/lib/ReactMount' }, modulesDirectories: [_path2.default.dirname(_path2.default.resolve(process.cwd(), filename)), 'web_modules', 'node_modules'] }, eslint: { diff --git a/lib/webpack/entry.js b/lib/webpack/entry.js index 9d5fa5f..883da6c 100644 --- a/lib/webpack/entry.js +++ b/lib/webpack/entry.js @@ -47,7 +47,7 @@ function entryDev(filename, flags) { const host = flags.host === '::' ? 'localhost' : flags.host; return { - [entryName]: [require.resolve('./assets/public-path.js'), `${ require.resolve('webpack-dev-server/client') }?http://${ host }:${ flags.port }/`, require.resolve('webpack/hot/dev-server'), (0, _resolveToCwd2.default)(filename)] + [entryName]: [`${ require.resolve('webpack-dev-server/client') }?http://${ host }:${ flags.port }/`, require.resolve('webpack/hot/dev-server'), require.resolve('./assets/public-path.js'), (0, _resolveToCwd2.default)(filename)] }; } diff --git a/package.json b/package.json index 80e4515..69a836c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aik", - "version": "0.12.1", + "version": "0.12.1-wip", "description": "Frontend Playground", "bin": "cli.js", "main": "lib/index.js", diff --git a/src/webpack/config-builder.js b/src/webpack/config-builder.js index c2f59bd..f1c6793 100644 --- a/src/webpack/config-builder.js +++ b/src/webpack/config-builder.js @@ -25,6 +25,7 @@ export default function webpackConfigBuilder(filename: string, flags: CLIFlags, loaders: loaders(flags, params) }, resolve: { + alias: { 'react/lib/ReactMount': 'react-dom/lib/ReactMount' }, modulesDirectories: [ path.dirname(path.resolve(process.cwd(), filename)), 'web_modules', diff --git a/src/webpack/entry.js b/src/webpack/entry.js index c2bb273..48e4ece 100644 --- a/src/webpack/entry.js +++ b/src/webpack/entry.js @@ -34,9 +34,9 @@ export function entryDev(filename: string, flags: CLIFlags): Entry { return { [entryName]: [ - require.resolve('./assets/public-path.js'), `${require.resolve('webpack-dev-server/client')}?http://${host}:${flags.port}/`, require.resolve('webpack/hot/dev-server'), + require.resolve('./assets/public-path.js'), resolveToCwd(filename) ] };