Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
added 1 character in body
Source Link

Webpack builds one js bundle file, so you need to get rid of the cdn's in the html file. You can add them into the webpack.config file with plugins.

npm install webpack-cdn-plugin --save-dev 

https://www.npmjs.com/package/webpack-cdn-plugin

- EDIT -

You could do npx create-react-app your-app

or

Or if you just want react and babel you could use npm.

Make sure you have a package.json.

npm init 

add react.

npm install react react-dom --save-dev 

https://www.npmjs.com/package/react-dom

add babel.

npm install babel-loader @babel/core @babel/preset-env @babel/preset-react --save-dev 

https://babeljs.io/setup#installation

You can find the dependencies in your package.json.

Then reconfigure webpack.config.js.

module.exports = { entry: './src/app.js', output: { path: path.join(_dirname, 'public'), filename: 'bundle.js' module: { rules: [ { test: /\.(js|jsx)$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: { presets: [ '@babel/preset-env', '@babel/preset-reactreact' ] } } } ] } }; 

https://webpack.js.org/configuration/

Webpack builds one js bundle file, so you need to get rid of the cdn's in the html file. You can add them into the webpack.config file with plugins.

npm install webpack-cdn-plugin --save-dev 

https://www.npmjs.com/package/webpack-cdn-plugin

- EDIT -

You could do npx create-react-app your-app

or

Or if you just want react and babel you could use npm.

Make sure you have a package.json.

npm init 

add react.

npm install react react-dom --save-dev 

https://www.npmjs.com/package/react-dom

add babel.

npm install babel-loader @babel/core @babel/preset-env @babel/preset-react --save-dev 

https://babeljs.io/setup#installation

You can find the dependencies in your package.json.

Then reconfigure webpack.config.js.

module.exports = { entry: './src/app.js', output: { path: path.join(_dirname, 'public'), filename: 'bundle.js' module: { rules: [ { test: /\.(js|jsx)$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: { presets: [ '@babel/preset-env', '@babel/preset-react ] } } } ] } }; 

https://webpack.js.org/configuration/

Webpack builds one js bundle file, so you need to get rid of the cdn's in the html file. You can add them into the webpack.config file with plugins.

npm install webpack-cdn-plugin --save-dev 

https://www.npmjs.com/package/webpack-cdn-plugin

- EDIT -

You could do npx create-react-app your-app

or

Or if you just want react and babel you could use npm.

Make sure you have a package.json.

npm init 

add react.

npm install react react-dom --save-dev 

https://www.npmjs.com/package/react-dom

add babel.

npm install babel-loader @babel/core @babel/preset-env @babel/preset-react --save-dev 

https://babeljs.io/setup#installation

You can find the dependencies in your package.json.

Then reconfigure webpack.config.js.

module.exports = { entry: './src/app.js', output: { path: path.join(_dirname, 'public'), filename: 'bundle.js' module: { rules: [ { test: /\.(js|jsx)$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: { presets: [ '@babel/preset-env', '@babel/preset-react' ] } } } ] } }; 

https://webpack.js.org/configuration/

added 6 characters in body
Source Link

Webpack builds one js bundle file, so you need to get rid of the cdn's in the html file. You can add them into the webpack.config file with plugins.

npm install webpack-cdn-plugin --save-dev 

https://www.npmjs.com/package/webpack-cdn-plugin

- EDIT -

You could do npx create-react-app your-app

or

Or if you just want react and babel you could use npm.

Make sure you have a package.json.

npm init 

add react.

npm install react react-dom --save-dev 

https://www.npmjs.com/package/react-dom

add babel.

npm install babel-loader @babel/core   @babel/preset-env @babel/preset-react --save-dev 

https://babeljs.io/setup#installation

You can find the dependencies in your package.json.

Then reconfigure webpack.config.js.

module.exports = { entry: './src/app.js', output: { path: path.join(_dirname, 'public'), filename: 'bundle.js' module: { rules: [ { test: /\.(js|jsx)$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: { presets: [ '@babel/preset-env', '@babel/preset-react ] } } } ] } }; 

https://webpack.js.org/configuration/

Webpack builds one js bundle file, so you need to get rid of the cdn's in the html file. You can add them into the webpack.config file with plugins.

npm install webpack-cdn-plugin --save-dev 

https://www.npmjs.com/package/webpack-cdn-plugin

- EDIT -

You could do npx create-react-app your-app

or

Or if you just want react and babel you could use npm.

Make sure you have a package.json.

npm init 

add react.

npm install react react-dom --save-dev 

https://www.npmjs.com/package/react-dom

add babel.

npm install babel-loader @babel/core @babel/preset-env @babel/preset-react --save-dev 

https://babeljs.io/setup#installation

You can find the dependencies in your package.json.

Then reconfigure webpack.config.js.

module.exports = { entry: './src/app.js', output: { path: path.join(_dirname, 'public'), filename: 'bundle.js' module: { rules: [ { test: /\.(js|jsx)$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: { presets: [ '@babel/preset-env', '@babel/preset-react ] } } } ] } }; 

https://webpack.js.org/configuration/

Webpack builds one js bundle file, so you need to get rid of the cdn's in the html file. You can add them into the webpack.config file with plugins.

npm install webpack-cdn-plugin --save-dev 

https://www.npmjs.com/package/webpack-cdn-plugin

- EDIT -

You could do npx create-react-app your-app

or

Or if you just want react and babel you could use npm.

Make sure you have a package.json.

npm init 

add react.

npm install react react-dom --save-dev 

https://www.npmjs.com/package/react-dom

add babel.

npm install babel-loader @babel/core   @babel/preset-env @babel/preset-react --save-dev 

https://babeljs.io/setup#installation

You can find the dependencies in your package.json.

Then reconfigure webpack.config.js.

module.exports = { entry: './src/app.js', output: { path: path.join(_dirname, 'public'), filename: 'bundle.js' module: { rules: [ { test: /\.(js|jsx)$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: { presets: [ '@babel/preset-env', '@babel/preset-react ] } } } ] } }; 

https://webpack.js.org/configuration/

added 1152 characters in body
Source Link

Webpack builds one js bundle file, so you need to get rid of the cdn's in the html file. You can add them into the webpack.config file with plugins.

npm install webpack-cdn-plugin --save-dev 

https://www.npmjs.com/package/webpack-cdn-plugin

- EDIT -

You could do npx create-react-app your-app

or

Or if you just want react and babel you could use npm.

Make sure you have a package.json.

npm init 

add react.

npm install react react-dom --save-dev 

https://www.npmjs.com/package/react-dom

add babel.

npm install babel-loader @babel/core @babel/preset-env @babel/preset-react --save-dev 

https://babeljs.io/setup#installation

You can find the dependencies in your package.json.

Then reconfigure webpack.config.js.

module.exports = { entry: './src/app.js', output: { path: path.join(_dirname, 'public'), filename: 'bundle.js' module: { rules: [ { test: /\.(js|jsx)$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: { presets: [ '@babel/preset-env', '@babel/preset-react ] } } } ] } }; 

https://webpack.js.org/configuration/

Webpack builds one js bundle file, so you need to get rid of the cdn's in the html file. You can add them into the webpack.config file with plugins.

npm install webpack-cdn-plugin --save-dev 

https://www.npmjs.com/package/webpack-cdn-plugin

Webpack builds one js bundle file, so you need to get rid of the cdn's in the html file. You can add them into the webpack.config file with plugins.

npm install webpack-cdn-plugin --save-dev 

https://www.npmjs.com/package/webpack-cdn-plugin

- EDIT -

You could do npx create-react-app your-app

or

Or if you just want react and babel you could use npm.

Make sure you have a package.json.

npm init 

add react.

npm install react react-dom --save-dev 

https://www.npmjs.com/package/react-dom

add babel.

npm install babel-loader @babel/core @babel/preset-env @babel/preset-react --save-dev 

https://babeljs.io/setup#installation

You can find the dependencies in your package.json.

Then reconfigure webpack.config.js.

module.exports = { entry: './src/app.js', output: { path: path.join(_dirname, 'public'), filename: 'bundle.js' module: { rules: [ { test: /\.(js|jsx)$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: { presets: [ '@babel/preset-env', '@babel/preset-react ] } } } ] } }; 

https://webpack.js.org/configuration/

Source Link
Loading