Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Calendar from 'react-calendar';
- import Calendar from 'react-calendar';
- ...
- var _MonthView2 = _interopRequireDefault(_MonthView);
- require('./Calendar.css');
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- ...
- C:NODEpath_to_app_dirnode_modulesreact-calendardistCalendar.css:1
- (function (exports, require, module, __filename, __dirname) { .react-calendar {
- ^
- SyntaxError: Unexpected token .
- at createScript (vm.js:80:10)
- at Object.runInThisContext (vm.js:139:10)
- at Module._compile (module.js:616:28)
- at Object.Module._extensions..js (module.js:663:10)
- at Module.load (module.js:565:32)
- at tryModuleLoad (module.js:505:12)
- at Function.Module._load (module.js:497:3)
- at Module.require (module.js:596:17)
- at require (internal/module.js:11:18)
- at Object.<anonymous> (C:NODEpath_to_app_dirnode_modulesreact-calendardistentry.js:28:1)
- at Module._compile (module.js:652:30)
- at Object.Module._extensions..js (module.js:663:10)
- at Module.load (module.js:565:32)
- at tryModuleLoad (module.js:505:12)
- at Function.Module._load (module.js:497:3)
- at Module.require (module.js:596:17)
- const webpack = require('webpack');
- const path = require('path');
- const nodeExternals = require('webpack-node-externals');
- const StartServerPlugin = require('start-server-webpack-plugin');
- const MiniCssExtractPlugin = require("mini-css-extract-plugin");
- module.exports = {
- devtool: 'cheap-module-source-map',
- watch: true,
- mode: 'development',
- target: 'node',
- entry: [
- 'babel-polyfill',
- 'webpack/hot/poll?1000',
- path.resolve('./api/index'),
- ],
- output: {
- path: path.resolve('.build'),
- filename: 'server.js',
- },
- resolve: {
- modules: [
- path.resolve('.'), // to resolve path 'server/', 'config/'
- path.resolve('./client'), // to resolve path liek '/components' on client
- 'node_modules',
- ],
- },
- externals: [
- nodeExternals({
- whitelist: ['webpack/hot/poll?1000'],
- }),
- ],
- module: {
- rules: [
- {
- test: /.js?$/,
- use: 'babel-loader',
- exclude: /node_modules/,
- },
- {
- test: /.html$/,
- use: 'html-loader',
- },
- {
- test: /.(scss|css|sass)$/,
- include: [/node_modules/],
- use: [
- MiniCssExtractPlugin.loader,
- {
- loader: "css-loader",
- options: {
- modules: true,
- sourceMap: true,
- importLoader: 2
- }
- },
- "sass-loader"
- ]
- },
- {
- test: /.md$/,
- use: 'raw-loader',
- },
- {
- test: /.(png|jpg|jpeg|gif|woff|woff2|svg|eot|ttf|otf|wav|mp3)$/,
- use: [
- {
- loader: 'file-loader',
- options: {
- emitFile: false
- },
- },
- ],
- },
- ],
- },
- plugins: [
- new MiniCssExtractPlugin({
- filename: "css/styles.css",
- }),
- new StartServerPlugin('server.js'),
- new webpack.NamedModulesPlugin(),
- new webpack.HotModuleReplacementPlugin(),
- new webpack.NoEmitOnErrorsPlugin(),
- new webpack.DefinePlugin({
- 'process.env': {
- BUILD_TARGET: JSON.stringify('server'),
- NODE_ENV: JSON.stringify('development'),
- },
- }),
- ],
- stats: {
- modules: false,
- hash: false,
- version: false,
- colors: true,
- assets: false,
- },
- };
Add Comment
Please, Sign In to add comment